public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: Jim Rosenberg <[email protected]>
To: [email protected]
Subject: Re: Column name beginning with underscore ("_")?
Date: Mon, 4 Nov 2024 12:33:42 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On 11/4/24 12:02, Jim Rosenberg wrote:
> Is it considered bad Postgresql practice to have a column name that begins
> with the underscore character ("_")?
>
> I'm not sure where this is documented, but I'm seeing that Postgresql
> accepts prepending an underscore to a data type name as a kind of alias for
> appending [] to define an array data type. So even though Postgresql
> doesn't seem to have this problem, a human reader might confuse a column
> name beginning with _ as an array data type reference.
>
> Here is why I want to have some column names beginning with "_". I'm
> designing a database to shadow a public agency's data. I need some columns
> that reflect *my* shadow copy of the data, (like say download date) that
> don't have any semantic import with respect to the original data.
> Beginning such columns with "_" is a simple way to keep the column names
> uncluttered but indicate to the reader that the column applies to *my
> copy* but are not columns in the original data.
To reduce confusion something like?:
my_* or l(ocal)_*
>
> Comments?
>
>
--
Adrian Klaver
[email protected]
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Column name beginning with underscore ("_")?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox