| From: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> |
|---|---|
| To: | "Francisco Figueiredo Jr(dot)" <fxjrlists(at)yahoo(dot)com(dot)br> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
| Subject: | Re: Why select * from function doesn't work when function |
| Date: | 2003-07-22 20:56:15 |
| Message-ID: | Pine.LNX.4.21.0307222154510.31066-100000@ponder.fairway2k.co.uk |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, 22 Jul 2003, Francisco Figueiredo Jr. wrote:
> > How's this for an alternative if you really don't want any rows returned:
> >
> > create function fincF ( ) returns setof integer as '
> > begin
> > delete from blah;
> > return;
> > end;
> > ' language 'plpgsql';
> >
> >
>
> This works, but what I really want is not to return any rows. I mean,
> the problem is not return null, but the error I get if I select * from
> voidfunction.
>
> I just wanted void functions behave like others when called as select *
> from voidfunction So I dont have to do select voidfunction. :)
But that last does exactly that. Doesn't even return a null. Give it a quick
go, skip the delete statement obviously, and see. You'll get something like:
?
-------
(0 rows)
--
Nigel J. Andrews
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jan Wieck | 2003-07-22 20:57:56 | Re: php with postgres |
| Previous Message | ivan | 2003-07-22 20:51:29 | new idea for COPY and MOVE |