Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2GKi6x58609 for ; Fri, 16 Mar 2001 15:44:06 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f2GKi2t26122; Fri, 16 Mar 2001 15:44:02 -0500 (EST) To: Roberto Mello cc: pgsql-docs@postgresql.org Subject: Re: Revamped PL/pgSQL Documentation In-reply-to: <20010316125233.A21495@cc.usu.edu> References: <20010316125233.A21495@cc.usu.edu> Comments: In-reply-to Roberto Mello message dated "Fri, 16 Mar 2001 12:52:33 -0700" Date: Fri, 16 Mar 2001 15:44:01 -0500 Message-ID: <26119.984775441@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/78 X-Sequence-Number: 511 Roberto Mello writes: > The part that confuses me is the end. I assume that if you specify > DEFAULT you must specify a value. Am I right in understanding that > notation as meaning: > name [ CONSTANT ] type [ NOT NULL ] [ DEFAULT value | := value ]; > or perhaps it could be written like this: > name [ CONSTANT ] type [ NOT NULL ] [ { DEFAULT | := } value ]; Use the source, Luke ... a quick look into plpgsql's gram.y shows that the latter is correct, ie, 'DEFAULT' and ':=' are interchangeable introducers for an initialization expression. regards, tom lane