There is one other issue that I forgot to mention, my program is taking existing databases and converting and loading them into a new Postgres DB, strange that one of my first test database actually had cmax as a column, unfortunately i'm not at liberty to go back and tell my customer you need to change your database columns... I'd argue we can be assured SQL reserved words won't be used for the obvious reason, but not Postgres's system columns, because of a short sighted design flaw. Hard for me to go back and tell a MSSQL or Oracle DBA use you need to change your database and stop using Postgres's reserved column names... That isn't gonna happen, and I would argue they have a valid point Postgres shouldn't impose any additional restrictions on reserved words besides what SQL imposes, especially when it would be easily for Postges just as compilers did to prefix system required column/variables with underscores.
The fix is really simply prefix system reserved column names with one or two underscores. Simple clean prevents the issue between user code and database code...
From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Tuesday, October 3, 2017 7:25 AM
To: Euler Taveira
Cc: dan d; pgsql-docs@postgresql.org
Subject: Re: [DOCS] Doc BUG and/or Change Request: Include Postgres's system columns in reserved words in docs, Chnage to previx sytem colums with 2 underscores?