Re: Doc BUG and/or Change Request: Include Postgres's system columns in reserved words in docs, Chnage to previx sytem colums with 2 underscores?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Euler Taveira <euler(at)timbira(dot)com(dot)br>
Cc: dan d <dano2k3(at)hotmail(dot)com>, "pgsql-docs(at)postgresql(dot)org" <pgsql-docs(at)postgresql(dot)org>
Subject: Re: Doc BUG and/or Change Request: Include Postgres's system columns in reserved words in docs, Chnage to previx sytem colums with 2 underscores?
Date: 2017-10-03 14:25:43
Message-ID: CAKFQuwYNZ8_nKrFA4XxRoXOf0Jxckj8bp8m9AheeOYLVry8qHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Tue, Oct 3, 2017 at 6:13 AM, Euler Taveira <euler(at)timbira(dot)com(dot)br> wrote:

> 2017-10-02 22:30 GMT-03:00 dan d <dano2k3(at)hotmail(dot)com>:
> > Npgsql.PostgresException (0x80004005): 42701: column name "cmax"
> conflicts
> > with a system column name
> >
> > My first step was to google "Postgres Reserved Words" will eventually
> get
> > you to Appendix C in the doc but not mention about any system columns,
> url
> > for help page:
> >
> > https://www.postgresql.org/docs/9.6/static/sql-keywords-appendix.html
> >
> The title is clear: *SQL* Key Words. It is not *PostgreSQL* Key Words.
> BTW, system columns are documented [1].
>

​That's a bit unconvincing since there are words on that table that are not
marked as being reserved in any of the three​ SQL standard columns.

​Its user-error that an error message clearly indicating "system column
name" prompted a search for reserved words instead of "system columns". ​

The main distinction here is that "cmax" is a valid identifier expect when
used as a table column name (you can, for instance, name columns of CTEs
cmax) due to it already being in use. Given the clarity of the error
message and the fact that this is first I've seen the particular complaint
in many years of monitoring these lists, I'd say trying to add system
columns to the listing of reserved words in the interest of
"comprehensiveness" doesn't outweigh the complexity that would be
introduced explaining how it differs from other reserved words.

I wouldn't be opposed to adding a sentence and cross-reference link to the
system columns page and pointing out that specific column names are also
already reserved for system use.

​David J.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2017-10-03 15:12:13 Re: Document PUBLIC grants on PUBLIC schema
Previous Message Tom Lane 2017-10-03 14:15:20 Re: SYSID can no longer be specified