Re: help with a function - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: help with a function
Date
Msg-id Pine.LNX.4.30.0106061750290.757-100000@peter.localdomain
Whole thread Raw
In response to help with a function  ("Clayton Cottingham aka drfrog" <drfrog@smartt.com>)
List 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



pgsql-sql by date:

Previous
From: Judd Maltin
Date:
Subject: Re: "Day" from 8am to 3am
Next
From: Stephan Szabo
Date:
Subject: Re: Tutorial : using foreign keys, retrictions etc