Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AB593476878 for ; Tue, 17 Dec 2002 09:29:53 -0500 (EST) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id 20618476864 for ; Tue, 17 Dec 2002 09:29:48 -0500 (EST) Received: from klaster.net (pj67.krakow.cvx.ppp.tpnet.pl [217.99.210.67]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id D60542B21F; Tue, 17 Dec 2002 15:13:35 +0100 (CET) Message-ID: <3DFF355B.4000905@klaster.net> Date: Tue, 17 Dec 2002 15:31:55 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gary Stainburn Cc: Christoph Haller , pgsql-sql@postgresql.org Subject: Re: join and dynamic view References: <3DFF2A7B.B26EEF93@rodos.fzk.de> <200212171411.53358.gary.stainburn@ringways.co.uk> In-Reply-To: <3DFF2A7B.B26EEF93@rodos.fzk.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/206 X-Sequence-Number: 10794 Gary Stainburn wrote: > > I found that the compile error complaining about the 'OR' was on the > > CREATE OR REPLACE FUNCTION > > line. I removed the 'OR REPLACE' and everything worked fine. OR REPLACE is since postgres 7.2 > > > Also I had to change the returns to 'opaque' and 'return 0' to 'return > null' In this case it's ok to "return null", but if you create "before" trigger you shoud "return new", because "return null" forces postgres not to insert any data. Tomasz Myrta