Is timestamptz alias documented?

Started by Chrisover 15 years ago5 messagesdocs
Jump to latest
#1Chris
ctlajoie@gmail.com

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Chris (#1)
Re: Is timestamptz alias documented?

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

#3Chris
ctlajoie@gmail.com
In reply to: Tom Lane (#2)
Re: Is timestamptz alias documented?

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.html

We 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/&amp;q=timestamptz

Chris

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Tom Lane (#2)
Re: Is timestamptz alias documented?

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

#5Robert Haas
robertmhaas@gmail.com
In reply to: Alvaro Herrera (#4)
Re: Is timestamptz alias documented?

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

Attachments:

timestamptz-doc.patchapplication/octet-stream; name=timestamptz-doc.patchDownload+6-1