Return from stored procedures
Return from stored procedures
От:
"Graham Vickrage" <graham@digitalplanit.com>
Дата:
Probably a very simple question, but how do you define a function that returns the sucess of an insert or update in a function i.e. CREATE FUNCTION foo ( varchar, int8 ) RETURNS bool AS 'UPDATE table WHERE something' LANGUAGE 'sql'; Cheers Graham
Re: Return from stored procedures
От:
Kovacs Zoltan Sandor <tip@pc10.radnoti-szeged.sulinet.hu>
Дата:
> Probably a very simple question, but how do you define a function that > returns the sucess of an insert or update in a function i.e. > > CREATE FUNCTION foo ( varchar, int8 ) RETURNS bool > AS 'UPDATE table WHERE something' > LANGUAGE 'sql'; With SQL functions you can't (as far as I know). Try PLPGSQL ones instead, you can use the keyword 'found'. See the documentation for details. Zoltan