On Tue, 2002-05-28 at 21:52, Peter Eisentraut wrote:
> Louis-David Mitterrand writes:
> 
> > Shouldn't plpgsql shortcut AND conditions when a previous one fails, as
> > perl does?
> 
> Shouldn't perl evaluate all operands unconditionally, like plpgsql does?
> 
> Seriously, if you want to change this you have to complain to the SQL
> standards committee.

Is plpgsl a SQL standards committee standard ?


and is the following non-standard ?

(itest is a 16k row test table with i in 1-16k)

hannu=# create sequence itest_seq;
CREATE
hannu=# select nextval('itest_seq');
 nextval 
---------
       1
(1 row)

hannu=# select count(*) from itest where false and true;
 count 
-------
     0
(1 row)

hannu=# select count(*) from itest where false and i =
nextval('itest_seq');
 count 
-------
     0
(1 row)

hannu=# select nextval('itest_seq');
 nextval 
---------
       2
(1 row)

hannu=# select count(*) from itest where i = nextval('itest_seq');
 count 
-------
     0
(1 row)

hannu=# select nextval('itest_seq');
 nextval 
---------
   16387
(1 row)

---------------------
Hannu



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to