Re: [GENERAL] Nulls in timestamps

2005-07-16 Thread Mark Morgan Lloyd
Thanks, that looks useful. I'll investigate once I've got the servers upgraded and replication running. Bruno Wolff III wrote: On Wed, Jul 13, 2005 at 18:15:12 +, [EMAIL PROTECTED] wrote: Many thanks Tom. Inconvenient from the point of view of the application but still useful

Re: [GENERAL] Nulls in timestamps

2005-07-15 Thread Bruno Wolff III
On Wed, Jul 13, 2005 at 18:15:12 +, [EMAIL PROTECTED] wrote: Many thanks Tom. Inconvenient from the point of view of the application but still useful information. The situation is that I've got a query with numerous subselects, each of which has to return exactly one row so I was doing

[GENERAL] Nulls in timestamps

2005-07-13 Thread markMLl . pgsql-general
Where does PostgreSQL rank nulls when sorting a column of timestamps, is this behaviour deterministic, and can I rely on it not changing in the future? Apologies if this shows up as a repost, I've had gateway problems at this end. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread Tom Lane
[EMAIL PROTECTED] writes: Where does PostgreSQL rank nulls when sorting a column of timestamps, is this behaviour deterministic, and can I rely on it not changing in the future? Nulls sort high (in any datatype, not only timestamps). It's possible that we'd offer an option to make them sort

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread markMLl . pgsql-general
Many thanks Tom. Inconvenient from the point of view of the application but still useful information. The situation is that I've got a query with numerous subselects, each of which has to return exactly one row so I was doing a union with a nulled record then selecting the most recent: obviously

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread Scott Marlowe
On Wed, 2005-07-13 at 12:41, Tom Lane wrote: [EMAIL PROTECTED] writes: Where does PostgreSQL rank nulls when sorting a column of timestamps, is this behaviour deterministic, and can I rely on it not changing in the future? Nulls sort high (in any datatype, not only timestamps). It's

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: On Wed, 2005-07-13 at 12:41, Tom Lane wrote: Nulls sort high (in any datatype, not only timestamps). It's possible that we'd offer an option to make them sort low in the future, but I can't imagine that we'd change the default behavior. Isn't this

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread Mark Morgan Lloyd
Scott Marlowe wrote: On Wed, 2005-07-13 at 12:41, Tom Lane wrote: [EMAIL PROTECTED] writes: Where does PostgreSQL rank nulls when sorting a column of timestamps, is this behaviour deterministic, and can I rely on it not changing in the future? Nulls sort high (in any datatype,

Re: [GENERAL] Nulls in timestamps

2005-07-13 Thread Mark Morgan Lloyd
Tom Lane wrote: According to the SQL spec it's implementation defined, which means different DBs could do it differently but they have to tell you what they will do. Implementation dependent effectively means the behavior is not specified at all. One problem is that even if the server is