From: | Sachin Kotwal <kotsachin(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Naming conventions for column names |
Date: | 2017-11-06 13:33:08 |
Message-ID: | CA+N_YAdJPaEhFETizKnjFWeGy6=phUZ+WFz3MBp5SovJScoBbw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)eisentraut(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Luca Ferrari | 2017-11-06 13:59:52 | Re: xmin increasing within a transaction block? |
Previous Message | Andres Freund | 2017-11-06 13:29:30 | Re: xmin increasing within a transaction block? |