Sample Header Ad - 728x90

What is the purpose of the keyword "ID" in PostgreSQL?

4 votes
1 answer
3734 views
I'm new to PostgreSQL and I ran into problems using the following query: SELECT * FROM table1 WHERE ID = 1 > ERROR: column "id" does not exist LINE 2: WHERE ID = 1 where ID is a column I added via a GUI-tool.

I then found out that ID is a keyword in my current version of PSQL and should be quoted. But I can't recognize what is this ID for.
On the linked page there is the following notice: > It is important to understand before studying Table C-1 that the fact that a key word is not reserved in PostgreSQL (==true) does not mean that the feature related to the word is not implemented. So, ID is not marked as a PostgreSQL keyword and there seems to be a feature connected to it, but I can't find out which. SELECT ID itself turns into the same error message as posted above.
Asked by 32bitfloat (647 rep)
Sep 11, 2012, 09:10 PM
Last activity: Sep 11, 2012, 10:59 PM