pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Is timestamptz alias documented?
5+ messages / 4 participants
[nested] [flat]

* Is timestamptz alias documented?
@ 2010-12-07 18:28 Chris <ctlajoie@gmail.com>
  2010-12-07 18:35 ` Re: Is timestamptz alias documented? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Chris @ 2010-12-07 18:28 UTC (permalink / raw)
  To: pgsql-docs

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

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Is timestamptz alias documented?
  2010-12-07 18:28 Is timestamptz alias documented? Chris <ctlajoie@gmail.com>
@ 2010-12-07 18:35 ` Tom Lane <tgl@sss.pgh.pa.us>
  2010-12-07 18:48   ` Re: Is timestamptz alias documented? Chris <ctlajoie@gmail.com>
  2010-12-07 19:20   ` Re: Is timestamptz alias documented? Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Tom Lane @ 2010-12-07 18:35 UTC (permalink / raw)
  To: Chris <ctlajoie@gmail.com>; +Cc: pgsql-docs

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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Is timestamptz alias documented?
  2010-12-07 18:28 Is timestamptz alias documented? Chris <ctlajoie@gmail.com>
  2010-12-07 18:35 ` Re: Is timestamptz alias documented? Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-12-07 18:48   ` Chris <ctlajoie@gmail.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Chris @ 2010-12-07 18:48 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-docs

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

Chris



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Is timestamptz alias documented?
  2010-12-07 18:28 Is timestamptz alias documented? Chris <ctlajoie@gmail.com>
  2010-12-07 18:35 ` Re: Is timestamptz alias documented? Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-12-07 19:20   ` Alvaro Herrera <alvherre@commandprompt.com>
  2010-12-14 22:02     ` Re: Is timestamptz alias documented? Robert Haas <robertmhaas@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Alvaro Herrera @ 2010-12-07 19:20 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Chris <ctlajoie@gmail.com>; pgsql-docs

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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Is timestamptz alias documented?
  2010-12-07 18:28 Is timestamptz alias documented? Chris <ctlajoie@gmail.com>
  2010-12-07 18:35 ` Re: Is timestamptz alias documented? Tom Lane <tgl@sss.pgh.pa.us>
  2010-12-07 19:20   ` Re: Is timestamptz alias documented? Alvaro Herrera <alvherre@commandprompt.com>
@ 2010-12-14 22:02     ` Robert Haas <robertmhaas@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Robert Haas @ 2010-12-14 22:02 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Chris <ctlajoie@gmail.com>; pgsql-docs

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.patch (application/octet-stream, 998B) download diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 66aef15..edb0384 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1443,6 +1443,9 @@ SELECT E'\\xDEADBEEF'; <primary>timestamp</primary> </indexterm> <indexterm zone="datatype-datetime"> + <primary>timestamptz</primary> + </indexterm> + <indexterm zone="datatype-datetime"> <primary>timestamp with time zone</primary> </indexterm> <indexterm zone="datatype-datetime"> @@ -1535,7 +1538,9 @@ SELECT E'\\xDEADBEEF'; be equivalent to <type>timestamp without time zone</type>, and <productname>PostgreSQL</productname> honors that behavior. (Releases prior to 7.3 treated it as <type>timestamp - with time zone</type>.) + with time zone</type>.) <type>timestamptz</type> is taken as an + abbreviation for <type>timestamp with time zone</type>; this is a + <productname>PostgreSQL</productname> extension. </para> </note>
^ permalink raw reply [nested|flat] 5+ messages in thread


end of thread, other threads:[~2010-12-14 22:02 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-12-07 18:28 Is timestamptz alias documented? Chris <ctlajoie@gmail.com>
2010-12-07 18:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-12-07 18:48   ` Chris <ctlajoie@gmail.com>
2010-12-07 19:20   ` Alvaro Herrera <alvherre@commandprompt.com>
2010-12-14 22:02     ` Robert Haas <robertmhaas@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox