Re: Why select * from function doesn't work when function

From: "Francisco Figueiredo Jr(dot)" <fxjrlists(at)yahoo(dot)com(dot)br>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Why select * from function doesn't work when function
Date: 2003-07-22 20:47:01
Message-ID: 3F1DA2C5.3090800@yahoo.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nigel J. Andrews wrote:

> 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. :]
>

:)

> 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. :)

--
Regards,

Francisco Figueiredo Jr.

------
"My grandfather once told me that there are two
kinds of people: those
who work and those who take the credit. He told me
to try to be in the
first group; there was less competition there."
- Indira Gandhi

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ivan 2003-07-22 20:51:29 new idea for COPY and MOVE
Previous Message Bruce Momjian 2003-07-22 20:45:53 Re: Is Patch Ok for deferred trigger disk queue?