Re: Nulls in timestamps

From: Mark Morgan Lloyd <markMLl(dot)pgsql-general(at)telemetry(dot)co(dot)uk>
To: pgsql-general(at)PostgreSQL(dot)org
Subject: Re: Nulls in timestamps
Date: 2005-07-13 22:17:41
Message-ID: 42D59305.3640601D@telemetry.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe wrote:
>
> On Wed, 2005-07-13 at 12:41, Tom Lane wrote:
> > markMLl(dot)pgsql-general(at)telemetry(dot)co(dot)uk 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 low in the future, but I
> > can't imagine that we'd change the default behavior.
>
> Isn't this behaviour implementation dependent, i.e. other database could
> do it anyway they wanted? Just thinking of portability issues one might
> have if one were to rely on null sort order in an application.

Yes, I believe it is implementation defined, and might not be deterministic.
However whilst the apps are currently written in Delphi on Win-32 (I'm hoping to
be able to port them to Lazarus on SPARC) much of the "intelligence" is
scripted, this includes almost all the SQL. Needless to say, the scripts are
stored in a table: apart from ODBC setup etc. (which I'm hoping to eliminate)
there's only a single .ini file per instance of the application suite, with
several instances running per machine. Works nicely :-)

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeffrey Melloy 2005-07-13 22:23:06 Table Update Systems (was: chosing a database name)
Previous Message woodb 2005-07-13 22:05:56 Re: Data type to store latitude and longitude