pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedexecuting a function
2+ messages / 2 participants
[nested] [flat]
* executing a function
@ 2003-07-09 05:29 adivi <adivi@maximizelearning.com>
2003-07-09 05:49 ` Re: executing a function Matthew Horoschun <mhoroschun@canprint.com.au>
0 siblings, 1 reply; 2+ messages in thread
From: adivi @ 2003-07-09 05:29 UTC (permalink / raw)
To: pgsql-sql
Hi,
i doubt if this should 've gone to the novice group, but it's all sql
i have a function that returns a setof rows from a table testtab :
____________________________________________________________________________________
CREATE FUNCTION "public"."gettesttab" () RETURNS SETOF public.testtab AS'
select * from TestTab;
'LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
____________________________________________________________________________________
"volatile" etc. was added by the EMS PostGreSql Manager.
i try to execute this function
but a call
"select * from gettesttab();"
or
"select gettesttab();"
return the error
ERROR: syntax error at or near "select"
the postmaster window also logs the erros:
ERROR: syntax error at or near "select"
WARNING: plpgsql: ERROR during compile of gettesttab near line 1
can simeone please help me out with this.
thanks in advance
regards
-pawan
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: executing a function
2003-07-09 05:29 executing a function adivi <adivi@maximizelearning.com>
@ 2003-07-09 05:49 ` Matthew Horoschun <mhoroschun@canprint.com.au>
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Horoschun @ 2003-07-09 05:49 UTC (permalink / raw)
To: adivi <adivi@maximizelearning.com>; +Cc: pgsql-sql
Hi Pawan,
> CREATE FUNCTION "public"."gettesttab" () RETURNS SETOF
> public.testtab AS'
> select * from TestTab;
> 'LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;
You want LANGUAGE 'sql'
Cheers
Matthew.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-07-09 05:49 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-09 05:29 executing a function adivi <adivi@maximizelearning.com>
2003-07-09 05:49 ` Matthew Horoschun <mhoroschun@canprint.com.au>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox