pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedhelp with a function
2+ messages / 2 participants
[nested] [flat]
* help with a function
@ 2001-06-02 17:27 Clayton Cottingham aka drfrog <drfrog@smartt.com>
0 siblings, 1 reply; 2+ messages in thread
From: Clayton Cottingham aka drfrog @ 2001-06-02 17:27 UTC (permalink / raw)
To: pgsql-sql
consider this function:
CREATE FUNCTION "test" (integer) RETURNS text AS 'return "select * from testt
limit $_[o];";' LANGUAGE 'plperl';
how would i get it to just run the query instead of just return it as text
using plperl?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: help with a function
@ 2001-06-06 15:51 Peter Eisentraut <peter_e@gmx.net>
parent: Clayton Cottingham aka drfrog <drfrog@smartt.com>
0 siblings, 0 replies; 2+ messages in thread
From: Peter Eisentraut @ 2001-06-06 15:51 UTC (permalink / raw)
To: Clayton Cottingham aka drfrog <drfrog@smartt.com>; +Cc: pgsql-sql
Clayton Cottingham aka drfrog writes:
> CREATE FUNCTION "test" (integer) RETURNS text AS 'return "select * from testt
> limit $_[o];";' LANGUAGE 'plperl';
>
> how would i get it to just run the query instead of just return it as text
> using plperl?
You would extend PL/Perl to support querying the database from within a
function.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-06-06 15:51 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-02 17:27 help with a function Clayton Cottingham aka drfrog <drfrog@smartt.com>
2001-06-06 15:51 ` Peter Eisentraut <peter_e@gmx.net>
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