Re: Is it possible to make the order of output the same as the order of input parameters?

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Is it possible to make the order of output the same as the order of input parameters?
Date: 2010-06-02 17:02:55
Message-ID: 20100602170255.GI21875@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Tim Landscheidt (tim(at)tim-landscheidt(dot)de) wrote:
> > Just thinking about it now; do SQL's semantics say it'll always do
> > the right thing? PG does in a couple of quick tests (i.e. one where
> > customer is a small table and PG prefers a seqscan and where it's larger
> > and prefers an index scan) but I'm not sure if this could change.
>
> PostgreSQL's documentation on VALUES has at least no guaran-
> tee of the order of data. I'd prefer David's solution :-).

Uhm, that's why there's an explicit ORDER BY.. I seriously doubt that
would ever be violated. If there was an approach suggested which didn't
include an ORDER BY *somewhere*, I'd be suspect of it.

Thanks,

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-06-02 17:06:12 Re: PosttgreSQL on AIX
Previous Message David Fetter 2010-06-02 16:55:02 Re: server-side extension in c++