| From: | Eric Brown <eric(dot)brown(at)propel(dot)com> |
|---|---|
| To: | Neil Conway <neilc(at)samurai(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Running functions that return void in psql |
| Date: | 2004-12-15 08:48:36 |
| Message-ID: | 1BCBCEE8-4E76-11D9-991E-000A95C7176C@propel.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Thanks. I forgot the 'return;' and the error message led me in the
wrong direction. Thanks!
On Dec 15, 2004, at 12:43 AM, Neil Conway wrote:
> Eric Brown wrote:
>> I've got quite a few plpgsql functions that insert, update or delete.
>> They're all declared to return void. All other functions, I can just
>> run 'select f(...);' from psql to test them. I don't understand how
>> to test these ones that return void from psql.
>
> neilc=# create function xyz() returns void as 'begin return; end;'
> language 'plpgsql';
> CREATE FUNCTION
> neilc=# select xyz();
> xyz
> -----
>
> (1 row)
>
> -Neil
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Huxton | 2004-12-15 09:05:06 | Re: java.sql.SQLException: ERROR: Relation 38868974 does |
| Previous Message | Michael Fuhr | 2004-12-15 08:47:06 | Re: Running functions that return void in psql |