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: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: dan d <dano2k3(at)hotmail(dot)com>
Cc: "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 13:13:23
Message-ID: CAHE3wgh=GfBB_B-u3fLgGei8Yw-h_Vwq6Bq72n-m4Y5GN9yv-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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].

> Got me thinking what the convention use to be in C starting out 30 years
> ago, should work good in Postgres as well? Most all C compilers would
> prefix variables or items within system struct that were considered
> system/reserved with an underscores or two. This worked great before C++
> which brought classes and namespaces to assist in scoping. This practice
> worked well to prevent name collisions between users code the compiler
> itself should work nicely in Postgres too. Finally if this convention is
> adapted there could be one generic note in the docs saying "User columns
> should never being with an underscore." This convention worked well for C
> before C++ exists, should work good for Postgres too?
>
This boat was already shipped a long time ago. You can't change that
without breaking tons of applications.

[1] https://www.postgresql.org/docs/9.6/static/ddl-system-columns.html

--
Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2017-10-03 14:15:20 Re: SYSID can no longer be specified
Previous Message Marco Pennekamp 2017-10-03 12:41:42 Re: Levenshtein function cost parameters are in the wrong order