In all examples from the PostGIS Raster reference the primary key in tables with a raster column is named rid. I wonder if that naming is expected by any functionality of PostGIS itself or any client software connecting to PostGIS (such as mapserver for instance).

In other words:

Is the name rid for the primary key in raster tables a requirement, or can I use id as a primary key without running in to trouble?

1 Answer 1


The primary key can be named whatever you want. The use of rid in the docs is following the convention set by the use of gid in PostGIS geometry docs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.