Lists: | pgsql-docspgsql-hackers |
---|
From: | Markus Schaber <schabi(at)logix-tt(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | timestamptz alias |
Date: | 2006-10-02 22:15:44 |
Message-ID: | 45218F90.1050303@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Hi,
I'm happy that the rather verbose "timestamp with time zone" has the
much nicer alias "timestamptz", however it seems that this alias is not
documented, neither at
http://developer.postgresql.org/pgdocs/postgres/datatype-datetime.html
nor at http://www.postgresql.org/docs/8.1/interactive/datatype-datetime.html
I see it mentioned at
http://www.postgresql.org/docs/8.1/interactive/datatype.html but that's
possibly not where people look at first, when they search for the
timestamp type. (At least I found it only when grepping for
"timestamptz" in the docs. :-)
Should the alias be mentioned on the datetime page? The same for timetz?
What do you think?
Thanks,
Markus
From: | AgentM <agentm(at)themactionfaction(dot)com> |
---|---|
To: | PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-02 22:22:39 |
Message-ID: | 794403F6-6CB5-4726-806C-5EF76D64C7E3@themactionfaction.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
On Oct 2, 2006, at 18:15 , Markus Schaber wrote:
> Hi,
>
> I'm happy that the rather verbose "timestamp with time zone" has the
> much nicer alias "timestamptz", however it seems that this alias is
> not
> documented, neither at
> http://developer.postgresql.org/pgdocs/postgres/datatype-datetime.html
> nor at http://www.postgresql.org/docs/8.1/interactive/datatype-
> datetime.html
>
> I see it mentioned at
> http://www.postgresql.org/docs/8.1/interactive/datatype.html but
> that's
> possibly not where people look at first, when they search for the
> timestamp type. (At least I found it only when grepping for
> "timestamptz" in the docs. :-)
>
> Should the alias be mentioned on the datetime page? The same for
> timetz?
> What do you think?
I am pleased that the documentation promotes database-independent
("standard") SQL.
-M
From: | Jim Nasby <decibel(at)decibel(dot)org> |
---|---|
To: | AgentM <agentm(at)themactionfaction(dot)com> |
Cc: | PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-03 01:26:51 |
Message-ID: | 34B58049-42F3-468D-AA2A-AE79DC8FB244@decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
On Oct 2, 2006, at 6:22 PM, AgentM wrote:
> On Oct 2, 2006, at 18:15 , Markus Schaber wrote:
>> I'm happy that the rather verbose "timestamp with time zone" has the
>> much nicer alias "timestamptz", however it seems that this alias
>> is not
>> documented, neither at
>> http://developer.postgresql.org/pgdocs/postgres/datatype-
>> datetime.html
>> nor at http://www.postgresql.org/docs/8.1/interactive/datatype-
>> datetime.html
>>
>> I see it mentioned at
>> http://www.postgresql.org/docs/8.1/interactive/datatype.html but
>> that's
>> possibly not where people look at first, when they search for the
>> timestamp type. (At least I found it only when grepping for
>> "timestamptz" in the docs. :-)
>>
>> Should the alias be mentioned on the datetime page? The same for
>> timetz?
>> What do you think?
>
> I am pleased that the documentation promotes database-independent
> ("standard") SQL.
There's a difference between promoting and withholding info. I'd
rather see us explicitly state which is preferred and why.
BTW, another confusing example is all the string functions that are
essentially the same, such as substring and substr. (http://
www.postgresql.org/docs/8.1/interactive/functions-string.html)
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
From: | Markus Schaber <schabi(at)logix-tt(dot)com> |
---|---|
To: | |
Cc: | PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-03 09:20:35 |
Message-ID: | 45222B63.2070608@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Hi, Jim,
Jim Nasby wrote:
> There's a difference between promoting and withholding info. I'd rather
> see us explicitly state which is preferred and why.
Here's a small patch that adds an appropriate explanation.
Index: doc/src/sgml/datatype.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/datatype.sgml,v
retrieving revision 1.176
diff -u -r1.176 datatype.sgml
--- doc/src/sgml/datatype.sgml 22 Sep 2006 16:20:00 -0000 1.176
+++ doc/src/sgml/datatype.sgml 3 Oct 2006 09:14:32 -0000
@@ -1372,6 +1372,17 @@
</para>
</note>
+ <note>
+ <para>
+ <productname>PostgreSQL</productname> also supports the aliases
+ <type>timestamptz</type> for <type>timestamp with time zone</type>
+ and <type>timetz</type> for <type>time with time zone</type>. It
+ is recommended to avoid them, as the more verbose variants comply
+ to the SQL standard, and thus are more portable. But there are no
+ plans to drop the short aliases in future versions.
+ </para>
+ </note>
+
<para>
<type>time</type>, <type>timestamp</type>, and
<type>interval</type> accept an optional precision value
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Markus Schaber <schabi(at)logix-tt(dot)com> |
Cc: | PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-03 15:33:02 |
Message-ID: | 26117.1159889582@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Markus Schaber <schabi(at)logix-tt(dot)com> writes:
> Here's a small patch that adds an appropriate explanation.
If we're going to document these aliases, what of float4, float8, and bool?
Also, although the docs mention int2/int4/int8, it's more or less left
to the reader's imagination to deduce what they are.
Perhaps it'd be better to provide a small table of recognized type
aliases, rather than inserting equivalent notes into three or four places.
regards, tom lane
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Markus Schaber <schabi(at)logix-tt(dot)com>, PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-03 16:13:46 |
Message-ID: | 45228C3A.2090704@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Tom Lane wrote:
> Markus Schaber <schabi(at)logix-tt(dot)com> writes:
>
>> Here's a small patch that adds an appropriate explanation.
>>
>
> If we're going to document these aliases, what of float4, float8, and bool?
> Also, although the docs mention int2/int4/int8, it's more or less left
> to the reader's imagination to deduce what they are.
>
> Perhaps it'd be better to provide a small table of recognized type
> aliases, rather than inserting equivalent notes into three or four places.
>
>
you mean like the table here?
http://momjian.us/main/writings/pgsql/sgml/datatype.html
cheers
andrew
From: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Markus Schaber <schabi(at)logix-tt(dot)com>, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: [HACKERS] timestamptz alias |
Date: | 2006-10-03 16:47:16 |
Message-ID: | 20061003164715.GW81937@nasby.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Moving to -docs
On Tue, Oct 03, 2006 at 12:13:46PM -0400, Andrew Dunstan wrote:
> Tom Lane wrote:
> >Markus Schaber <schabi(at)logix-tt(dot)com> writes:
> >
> >>Here's a small patch that adds an appropriate explanation.
> >>
> >
> >If we're going to document these aliases, what of float4, float8, and bool?
> >Also, although the docs mention int2/int4/int8, it's more or less left
> >to the reader's imagination to deduce what they are.
> >
> >Perhaps it'd be better to provide a small table of recognized type
> >aliases, rather than inserting equivalent notes into three or four places.
> >
> >
>
>
> you mean like the table here?
> http://momjian.us/main/writings/pgsql/sgml/datatype.html
An issue I've seen with the docs is that for chapters that have a lot of
sections (such as 8), the section list at the start of each chapter
fills the screen, so it's easy to miss the fact that there's more info
beneath the list (which is wy presumably most folks never knew that
table existed).
I think the ideal way to handle this would be to put the table of
contents in a side-bar and flow the text around it. But that could be a
real bear to do in docbook/sgml, so perhaps it would be better to just
force the TOC for each chapter onto it's own page (and ensure the
overview/introduction text shows up in the TOC).
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Markus Schaber <schabi(at)logix-tt(dot)com>, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: [HACKERS] timestamptz alias |
Date: | 2006-10-03 16:57:17 |
Message-ID: | 4522966D.2080408@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Jim C. Nasby wrote:
> On Tue, Oct 03, 2006 at 12:13:46PM -0400, Andrew Dunstan wrote:
>
>>>
>>> Perhaps it'd be better to provide a small table of recognized type
>>> aliases, rather than inserting equivalent notes into three or four places.
>>>
>>>
>>>
>> you mean like the table here?
>> http://momjian.us/main/writings/pgsql/sgml/datatype.html
>>
>
> An issue I've seen with the docs is that for chapters that have a lot of
> sections (such as 8), the section list at the start of each chapter
> fills the screen, so it's easy to miss the fact that there's more info
> beneath the list (which is wy presumably most folks never knew that
> table existed).
>
> I think the ideal way to handle this would be to put the table of
> contents in a side-bar and flow the text around it. But that could be a
> real bear to do in docbook/sgml, so perhaps it would be better to just
> force the TOC for each chapter onto it's own page (and ensure the
> overview/introduction text shows up in the TOC).
>
I would like a frame driven version of the docs (c.f. doxygen, javadoc,
etc.). The we would not need contents links at the top of each chapter
like this. Navigating the HTML docs is less than pleasant.
Unfortunately, I don't have enough time or docbook-fu to be able to do this.
cheers
andrew
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: [HACKERS] timestamptz alias |
Date: | 2006-10-04 00:01:23 |
Message-ID: | 200610040201.24138.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Jim C. Nasby wrote:
> I think the ideal way to handle this would be to put the table of
> contents in a side-bar and flow the text around it.
It's all CSS, so this should be doable.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
From: | Markus Schaber <schabi(at)logix-tt(dot)com> |
---|---|
To: | pgsql-docs(at)postgresql(dot)org |
Subject: | Re: [HACKERS] timestamptz alias |
Date: | 2006-10-04 09:39:27 |
Message-ID: | 4523814F.3060507@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Hi, Jim,
Jim C. Nasby wrote:
> An issue I've seen with the docs is that for chapters that have a lot of
> sections (such as 8), the section list at the start of each chapter
> fills the screen, so it's easy to miss the fact that there's more info
> beneath the list (which is wy presumably most folks never knew that
> table existed).
>
> I think the ideal way to handle this would be to put the table of
> contents in a side-bar and flow the text around it. But that could be a
> real bear to do in docbook/sgml, so perhaps it would be better to just
> force the TOC for each chapter onto it's own page (and ensure the
> overview/introduction text shows up in the TOC).
I agree.
The fact that the TOC and the first part of the Chapter are on the same
page has annoyed me several times now. :-)
Regards,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
From: | Markus Schaber <schabi(at)logix-tt(dot)com> |
---|---|
To: | PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-04 09:41:28 |
Message-ID: | 452381C8.5090804@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Hi, Tom,
Tom Lane wrote:
>> Here's a small patch that adds an appropriate explanation.
>
> If we're going to document these aliases, what of float4, float8, and bool?
> Also, although the docs mention int2/int4/int8, it's more or less left
> to the reader's imagination to deduce what they are.
>
> Perhaps it'd be better to provide a small table of recognized type
> aliases, rather than inserting equivalent notes into three or four places.
It's not only about documenting the pure existence of the aliases (which
was already documented in the table on the datatype TOC page), it's also
about telling the user which of the names are the ones to avoid, and the
reasons to do so.
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Markus Schaber" <schabi(at)logix-tt(dot)com>, <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] timestamptz alias |
Date: | 2006-10-04 13:05:58 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCEA0FC21@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
> I would like a frame driven version of the docs (c.f.
> doxygen, javadoc, etc.). The we would not need contents links
> at the top of each chapter like this. Navigating the HTML
> docs is less than pleasant.
> Unfortunately, I don't have enough time or docbook-fu to be
> able to do this.
Yuck. Frames. Ickk. All the issues with bookmarking and searching and
things like that.
Anyway. If done, make sure the current version doesn't go away, but make
the frames version just an option instead.
//Magnus
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Magnus Hagander <mha(at)sollentuna(dot)net> |
Cc: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Markus Schaber <schabi(at)logix-tt(dot)com>, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: [HACKERS] timestamptz alias |
Date: | 2006-10-04 14:05:07 |
Message-ID: | 4523BF93.1020006@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Magnus Hagander wrote:
>> I would like a frame driven version of the docs (c.f.
>> doxygen, javadoc, etc.). The we would not need contents links
>> at the top of each chapter like this. Navigating the HTML
>> docs is less than pleasant.
>> Unfortunately, I don't have enough time or docbook-fu to be
>> able to do this.
>>
>
> Yuck. Frames. Ickk. All the issues with bookmarking and searching and
> things like that.
>
> Anyway. If done, make sure the current version doesn't go away, but make
> the frames version just an option instead.
>
>
>
Then use a tiled mechanism instead if you want to avoid frames. Or if
you want to be get more advanced some sort of Ajax solution. But we need
some sort of nav bar that you can drill down on. Navigation now is just
horrible, IMNSHO.
cheers
andrew
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Markus Schaber <schabi(at)logix-tt(dot)com> |
Cc: | PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-04 14:17:51 |
Message-ID: | 4523C28F.4080404@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Markus Schaber wrote:
> It's not only about documenting the pure existence of the aliases (which
> was already documented in the table on the datatype TOC page), it's also
> about telling the user which of the names are the ones to avoid, and the
> reasons to do so.
>
>
>
*blink* Why do any need to be avoided? What you use is a matter of
taste, and your organisation's coding standards. From a purely technical
POV I don't see any reason to avoid using either the canonical type
names or the various aliases.
cheers
andrew
From: | Markus Schaber <schabi(at)logix-tt(dot)com> |
---|---|
To: | PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-04 15:52:17 |
Message-ID: | 4523D8B1.7050007@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Hi, Andrew,
Andrew Dunstan wrote:
>> It's not only about documenting the pure existence of the aliases (which
>> was already documented in the table on the datatype TOC page), it's also
>> about telling the user which of the names are the ones to avoid, and the
>> reasons to do so.
>
> *blink* Why do any need to be avoided? What you use is a matter of
> taste, and your organisation's coding standards. From a purely technical
> POV I don't see any reason to avoid using either the canonical type
> names or the various aliases.
At least compatibility with the SQL standard, as well as with other
Databases might be a reason.
Using pure "timestamp" may lead human readers to be confused, because it
has both meanings with and without timezone historically, this might be
a reason to prefer the "timestamp with[out] time zone" wording.
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
From: | Jim Nasby <jimn(at)enterprisedb(dot)com> |
---|---|
To: | Markus Schaber <schabi(at)logix-tt(dot)com> |
Cc: | PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-06 02:18:40 |
Message-ID: | 06013250-FEB2-431C-9EE9-DB4CB037FE9E@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
On Oct 4, 2006, at 10:52 AM, Markus Schaber wrote:
> Andrew Dunstan wrote:
>>> It's not only about documenting the pure existence of the aliases
>>> (which
>>> was already documented in the table on the datatype TOC page),
>>> it's also
>>> about telling the user which of the names are the ones to avoid,
>>> and the
>>> reasons to do so.
>>
>> *blink* Why do any need to be avoided? What you use is a matter of
>> taste, and your organisation's coding standards. From a purely
>> technical
>> POV I don't see any reason to avoid using either the canonical type
>> names or the various aliases.
>
> At least compatibility with the SQL standard, as well as with other
> Databases might be a reason.
It would be nice to denote types/aliases that are and aren't ANSI. A
number are marked in the docs, but it would be good to add the info
to that summary table.
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
--
Jim Nasby jimn(at)enterprisedb(dot)com
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
From: | "Andrew Dunstan" <andrew(at)dunslane(dot)net> |
---|---|
To: | "Jim Nasby" <jimn(at)enterprisedb(dot)com> |
Cc: | "PostgreSQL-development hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-06 07:35:55 |
Message-ID: | 3449.24.211.165.134.1160120155.squirrel@www.dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
Jim Nasby wrote:
>
> It would be nice to denote types/aliases that are and aren't ANSI. A
> number are marked in the docs, but it would be good to add the info
> to that summary table.
Right under the table this sentence appears:
Compatibility: The following types (or spellings thereof) are specified
by SQL: bit, bit varying, boolean, char, character varying, character,
varchar, date, double precision, integer, interval, numeric, decimal,
real, smallint, time (with or without time zone), timestamp (with or
without time zone).
What's unclear about that?
cheers
andrew
From: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Jim Nasby <jimn(at)enterprisedb(dot)com>, PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: timestamptz alias |
Date: | 2006-10-08 17:03:26 |
Message-ID: | 20061008170325.GI72517@nasby.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs pgsql-hackers |
On Fri, Oct 06, 2006 at 02:35:55AM -0500, Andrew Dunstan wrote:
> Jim Nasby wrote:
> >
> > It would be nice to denote types/aliases that are and aren't ANSI. A
> > number are marked in the docs, but it would be good to add the info
> > to that summary table.
>
> Right under the table this sentence appears:
>
> Compatibility: The following types (or spellings thereof) are specified
> by SQL: bit, bit varying, boolean, char, character varying, character,
> varchar, date, double precision, integer, interval, numeric, decimal,
> real, smallint, time (with or without time zone), timestamp (with or
> without time zone).
>
> What's unclear about that?
Oops. This is what happens when I answer emails on a plane. :(
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)