Re: Why select * from function doesn't work when function - Mailing list pgsql-hackers

From Nigel J. Andrews
Subject Re: Why select * from function doesn't work when function
Date
Msg-id Pine.LNX.4.21.0307222121210.31066-100000@ponder.fairway2k.co.uk
Whole thread Raw
In response to Re: Why select * from function doesn't work when function  ("Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>)
Responses Re: Why select * from function doesn't work when function  ("Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>)
List pgsql-hackers
On Tue, 22 Jul 2003, Francisco Figueiredo Jr. wrote:

> > select * from funcF();
> > 
> 
> Yeap, it works, but you specified integer as the return type :)

Yes, that's because I knew the void wouldn't work. :]
> 
> I'd like to have the return type as void and be possible to call it with
> select * from funcF();

I don't believe it is possible. Makes sense since void doesn't really make
sense in that position in the statment.

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';


-- 
Nigel J. Andrews



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL 7.3.3 and Intel C compiler
Next
From: ivan
Date:
Subject: Re: did you read my mails ?