PostgreSQL order of evaluation

From: Petter Reinholdtsen <pere(at)hungry(dot)com>
To: pgsql-general(at)postgreSQL(dot)org
Subject: PostgreSQL order of evaluation
Date: 1999-08-19 23:25:54
Message-ID: 199908192325.BAA06123@minerva.cc.uit.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I've been trying to find where the order of evaluation for SQL is
defined. In short, I wounder if the following always gives the same
result:

CREATE SEQUENCE counter
start 1 increment 1 cache 1
minvalue 1
maxvalue 2147483647;
SELECT NEXTVAL('counter'), NEXTVAL('counter');

CREATE TABLE counts (
value1 integer,
value2 integer
);
INSERT INTO counts VALUES (NEXTVAL('counter'), NEXTVAL('counter'));

Will the first always return (1, 2) or are the SQL implementations
free to return (2,1). Will every SQL implementation insert (3,4) in
the table, or will some insert (4,3).

Will PostgreSQL always be evaluating left-to-right? Where in the
PostgreSQL manuals are this described?

BTW: I've implemented Oracles 'comment on' as functions. Where should
I send these functions and the perl tool to extract the comments?
--
##> Petter Reinholdtsen <## | pere(at)td(dot)org(dot)uit(dot)no

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yury Don 1999-08-20 05:08:28 long object names vs object description
Previous Message Henrique Pantarotto 1999-08-19 21:06:14 Re: [GENERAL] Trigger documentation? Need more examples.. pleeeze.. ; -)