Re: [GENERAL] Naming conventions for column names

Поиск
Список
Период
Сортировка
От Sachin Kotwal
Тема Re: [GENERAL] Naming conventions for column names
Дата
Msg-id CA+N_YAdJPaEhFETizKnjFWeGy6=phUZ+WFz3MBp5SovJScoBbw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Naming conventions for column names  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [GENERAL] Naming conventions for column names  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [GENERAL] xmin increasing within a transaction block?
Следующее
От: Luca Ferrari
Дата:
Сообщение: Re: [GENERAL] xmin increasing within a transaction block?