Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fA3EJqq92088 for ; Sat, 3 Nov 2001 09:19:53 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id fA3E7h062832 for pgsql-sql@postgresql.org; Sat, 3 Nov 2001 09:07:43 -0500 (EST) (envelope-from news) From: "Edward Grabczewski" X-Newsgroups: comp.databases.postgresql.sql Subject: Re: SQL FUNCTION return type on INSERT Date: Sat, 3 Nov 2001 14:12:36 -0000 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 24 Message-ID: <9s0tnd$1tbd$1@news.tht.net> References: <9s0n0p$1saj$1@news.tht.net> X-Complaints-To: scrappy@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 To: pgsql-sql@postgresql.org X-Archive-Number: 200111/36 X-Sequence-Number: 5421 I've just looked at the new online 7.2 documentation and found that all functions must end in some kind of select. How about this then? CREATE FUNCTION foo(varchar) RETURN unknown AS ' INSERT INTO footable VALUES ($1); SELECT null; ' LANGUAGE 'sql'; "Edward Grabczewski" wrote in message news:9s0n0p$1saj$1@news.tht.net... > What value should I RETURN for a SQL FUNCTION that contains an INSERT > statement? > > -- > Eddy Grabczewski > edward.grabczewski@btinternet.com > > >