pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Return from stored procedures
2+ messages / 2 participants
[nested] [flat]

* Return from stored procedures
@ 2000-11-10 09:24 Graham Vickrage <graham@digitalplanit.com>
  2000-11-10 11:08 ` Re: Return from stored procedures Kovacs Zoltan Sandor <tip@pc10.radnoti-szeged.sulinet.hu>
  0 siblings, 1 reply; 2+ messages in thread

From: Graham Vickrage @ 2000-11-10 09:24 UTC (permalink / raw)
  To: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Return from stored procedures
  2000-11-10 09:24 Return from stored procedures Graham Vickrage <graham@digitalplanit.com>
@ 2000-11-10 11:08 ` Kovacs Zoltan Sandor <tip@pc10.radnoti-szeged.sulinet.hu>
  0 siblings, 0 replies; 2+ messages in thread

From: Kovacs Zoltan Sandor @ 2000-11-10 11:08 UTC (permalink / raw)
  To: Graham Vickrage <graham@digitalplanit.com>; +Cc: pgsql-sql

> 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 




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-11-10 11:08 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-11-10 09:24 Return from stored procedures Graham Vickrage <graham@digitalplanit.com>
2000-11-10 11:08 ` Kovacs Zoltan Sandor <tip@pc10.radnoti-szeged.sulinet.hu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox