Обсуждение: Function's final statement must not be a SELECT

Поиск
Список
Период
Сортировка

Function's final statement must not be a SELECT

От
"Pavel Stehule"
Дата:
Hello,

I want do sql wrap for woid plpgsql function. But void SQL function must not 
finish SELECT cmd. I don't know any others command which I can use.

Can You help me?
Thank You
Pavel Stehule

_________________________________________________________________
Najdete si svou lasku a nove pratele na Match.com. http://www.msn.cz/



Re: Function's final statement must not be a SELECT

От
"Jaime Casanova"
Дата:
On 3/10/06, Pavel Stehule <pavel.stehule@hotmail.com> wrote:
> Hello,
>
> I want do sql wrap for woid plpgsql function. But void SQL function must not
> finish SELECT cmd. I don't know any others command which I can use.
>
> Can You help me?
> Thank You
> Pavel Stehule
>

perform * from your_table;

--
Atentamente,
Jaime Casanova

"What they (MySQL) lose in usability, they gain back in benchmarks, and that's
all that matters: getting the wrong answer really fast."                          Randal L. Schwartz


Re: Function's final statement must not be a SELECT

От
"Pavel Stehule"
Дата:


>From: "Jaime Casanova" <systemguards@gmail.com>
>To: "Pavel Stehule" <pavel.stehule@hotmail.com>
>CC: pgsql-hackers@postgresql.org
>Subject: Re: [HACKERS] Function's final statement must not be a SELECT
>Date: Sat, 11 Mar 2006 12:42:15 -0500
>
>On 3/10/06, Pavel Stehule <pavel.stehule@hotmail.com> wrote:
> > Hello,
> >
> > I want do sql wrap for woid plpgsql function. But void SQL function must 
>not
> > finish SELECT cmd. I don't know any others command which I can use.
> >
> > Can You help me?
> > Thank You
> > Pavel Stehule
> >
>
>perform * from your_table;
>

Sorry, I need SQL construct. Please try:

create or replace function foo(bool) returns void as $$ ... $$ language 
plpgsql volatile strict;

I can't to do:

create or replace function wrapper() returns void as $$ select foo(true); $$ 
language sql volatile strict;

Regards
Pavel

_________________________________________________________________
Najdete si svou lasku a nove pratele na Match.com. http://www.msn.cz/