Is timestamptz alias documented?
I have been unable to find where it is mentioned that timestamptz can be
used as shorthand for 'timestamp with time zone'. I discovered I could use
it by trying it out after I saw someone else use it. Is this a new alias, or
has it been around for some time? I am using 9.0, and have not tried it on
earlier versions.
I think it would be helpful to note this somewhere on the Date/Time Types
page.
Chris
Chris <ctlajoie@gmail.com> writes:
I have been unable to find where it is mentioned that timestamptz can be
used as shorthand for 'timestamp with time zone'.
See table 8-1 here:
http://www.postgresql.org/docs/9.0/static/datatype.html
We don't emphasize it, since it's a nonstandard Postgres-ism.
Is this a new alias, or
has it been around for some time?
It's been around since the '90s I'm sure, maybe even back to Berkeley days.
regards, tom lane
On Tue, Dec 7, 2010 at 11:35 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
See table 8-1 here:
http://www.postgresql.org/docs/9.0/static/datatype.htmlWe don't emphasize it, since it's a nonstandard Postgres-ism.
Thanks. I guess I understand why you don't want to emphasize a
non-standard Postgres feature. But why doesn't that page show up when
I do a search?
http://search.postgresql.org/search?u=/docs/9.0/static/&q=timestamptz
Chris
Excerpts from Tom Lane's message of mar dic 07 15:35:53 -0300 2010:
Chris <ctlajoie@gmail.com> writes:
Is this a new alias, or
has it been around for some time?It's been around since the '90s I'm sure, maybe even back to Berkeley days.
It appeared later; "timestamp" was the alias for "timestamp with time
zone" previously. But this was against the SQL standard so the new
alias was introduced as a backwards incompatible change. There are no
hits for a "grep -r timestamptz src/backend" in 7.1, but they are there
in 7.2. 2002 or so, then.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
On Tue, Dec 7, 2010 at 2:20 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
Excerpts from Tom Lane's message of mar dic 07 15:35:53 -0300 2010:
Chris <ctlajoie@gmail.com> writes:
Is this a new alias, or
has it been around for some time?It's been around since the '90s I'm sure, maybe even back to Berkeley days.
It appeared later; "timestamp" was the alias for "timestamp with time
zone" previously. But this was against the SQL standard so the new
alias was introduced as a backwards incompatible change. There are no
hits for a "grep -r timestamptz src/backend" in 7.1, but they are there
in 7.2. 2002 or so, then.
I think it'd be helpful to make brief mention of this in the section
on "Date/Time Types", perhaps along the lines of the attached patch.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company