Re: default value returned from sql stmt

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: David Salisbury <salisbury(at)globe(dot)gov>, pgsql-general(at)postgresql(dot)org
Subject: Re: default value returned from sql stmt
Date: 2012-03-30 07:46:52
Message-ID: CAFj8pRC+S5Hx_QRP-TBS08NW-he4sd-TmvGBFBj0_n7z4E7EFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2012/3/30 Richard Huxton <dev(at)archonet(dot)com>:
> On 29/03/12 23:28, Pavel Stehule wrote:
>>
>> select anum from t1 where anum = 4
>> union all select 100 limit 1;
>
>
> I'm not sure the ordering here is guaranteed by the standard though, is it?
> You could end up with the 4 being discarded.

A order is random for only "UNION", "UNION ALL" should to respect
order. But I didn't check it in standard.

Pavel

>
> --
>  Richard Huxton
>  Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2012-03-30 08:05:53 Re: Re: double check the role has what's kind of the privilege? And the same for the objects. Thanks.
Previous Message Richard Huxton 2012-03-30 07:42:45 Re: default value returned from sql stmt