Re: [GENERAL] Naming conventions for column names - Mailing list pgsql-general

From Sachin Kotwal
Subject Re: [GENERAL] Naming conventions for column names
Date
Msg-id CA+N_YAdJPaEhFETizKnjFWeGy6=phUZ+WFz3MBp5SovJScoBbw@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Naming conventions for column names  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [GENERAL] Naming conventions for column names
List pgsql-general
Hi Peter,

I can understand that it is important to maintain naming pattern same as system catalogs, but in that case we may need to redefine system catalogs naming conventions .

So that we can use those newly added naming conventions in system views as well.

It is difficult to understand usename = database user name and usesysid = system user id.
It is better to use full names to those columns, so that Users can easily understand those columns by their names.

In this case adding one or more laters will not cause any problem but will add more readability. 
In case adding 3 letters indicating the catalog , can we use 4 or 5 letters ?

I think we need to rethink about these short naming conventions which are making confusion, If community is ok with that.

Please share yours thoughts on this.


Regards,
Sachin Kotwal







On Mon, Nov 6, 2017 at 6:21 PM, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
On 11/6/17 05:36, Sachin Kotwal wrote:
> Is there any special reason to keep column names as usesysid
> and usename instead of usersysid and username in below system View?

The reason to *keep* them is compatibility.  The reason they are like
that to start with is because that is the naming pattern used in the
system catalogs: 3 letters indicating the catalog, plus additional
letters or words.  It is useful to use the same name in views such as
pg_stat_replication, so you can easily join different views and catalogs.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



--

Thanks and Regards,
Sachin Kotwal

pgsql-general by date:

Previous
From: Andres Freund
Date:
Subject: Re: [GENERAL] xmin increasing within a transaction block?
Next
From: Luca Ferrari
Date:
Subject: Re: [GENERAL] xmin increasing within a transaction block?