Tom Lane wrote:
The reason it's not SQL-standard is the data value isn't.
So not a problem.  Someone conforming to the spec limits on
what he puts in will see spec-compliant output.  I think all
you need is 'yyy-mm dd hh:mm:ss' where you omit yyy-mm if
zeroes, omit dd if zero, omit hh:mm:ss if zeroes (but maybe
only if dd is also 0?  otherwise your output is just dd which
is uncomfortably ambiguous).

Great.  That's what I'll do.

Any convention or preference on the naming of the GUC?
I assume "intervalstyle" is reasonable?

Or thoughts regarding the current EncodeInterval() that's
already using the "datestyle" GUC?


pg82=# select interval '1';
 interval
----------
 00:00:01
(1 row)

pg82=# set datestyle='sql';
SET

pg82=# select interval '1';
 interval
----------
 @ 1 sec
(1 row)

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to