Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D44004760E8 for ; Thu, 30 Jan 2003 09:26:23 -0500 (EST) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id 906D84760D4 for ; Thu, 30 Jan 2003 09:26:22 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Thu Jan 30 15:26:25 2003 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id PAA05861; Thu, 30 Jan 2003 15:26:25 +0100 (MET) Message-ID: <3E393610.7E3B9E77@rodos.fzk.de> Date: Thu, 30 Jan 2003 15:26:24 +0100 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Cc: ajglist@izzy.net Subject: Re: double linked list Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/500 X-Sequence-Number: 11365 > > On Thursday 30 January 2003 07:10, Christoph Haller wrote: > > I've seen CELKO's reply and find it very useful. > > But I cannot find anything about > > > > > BEGIN ATOMIC > > > DECLARE rightmost_spread INTEGER; > > > > > > SET rightmost_spread > > > =3D (SELECT rgt > > > FROM Frammis > > > WHERE part = 'G'); > > > ... > > > > Is this PostgreSQL at all? Any hints welcome. > > Mr Haller > > No, this is a dialect SQL-92 (SQL-99?) that Mr Celko uses for his > examples since his solutions are vendor neutral. He is big on standards, > so posting using the standard is his way of boosting them. > > BEGIN ATOMIC is BEGIN in PG. > > I am not sure how to declare a variable in PG in normal SQL. I don't do > it that often, but when I do I do this: > > CREATE TEMPORARY TABLE Rightmost_Spread > AS SELECT rightmost_spread > FROM Frammis > WHERE part = 'G'; > > I wonder what the alternatives are? > plpgsql is the best I can think of. And thanks for the quick reply. Regards, Christoph