Skip site navigation (1) Skip section navigation (2)

Re: SQL return value...

From: Richard Huxton <dev(at)archonet(dot)com>
To: Cristian Prieto <cristian(at)clickdiario(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: SQL return value...
Date: 2005-10-20 07:34:23
Message-ID: 4357487F.9070609@archonet.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-novice
Cristian Prieto wrote:
> This is maybe a really newbie question, but, when I have an SQL function
> like that:
> 
> $$
> Insert into mytable (id, name) values ($1, $2);
> $$
> 
> What return value suppose to return?

Either return "void" or return "boolean" and add a "SELECT true;" 
statement to the end of your function.

--
   Richard Huxton
   Archonet Ltd

In response to

pgsql-novice by date

Next:From: Gan Uesli StarlingDate: 2005-10-20 20:00:04
Subject: Array elem as foreign key?
Previous:From: Michael GlaesemannDate: 2005-10-19 22:33:30
Subject: Re: SQL return value...

pgsql-general by date

Next:From: Richard HuxtonDate: 2005-10-20 07:38:22
Subject: Re: From oracle to postgresql...
Previous:From: Richard HuxtonDate: 2005-10-20 07:30:54
Subject: Re: server , client encoding issue

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group