Re: help with a function

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Clayton Cottingham aka drfrog <drfrog(at)smartt(dot)com>
Cc: PostgreSQL SQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: help with a function
Date: 2001-06-06 15:51:22
Message-ID: Pine.LNX.4.30.0106061750290.757-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-06-06 15:53:08 Re: seleting all dates between two dates
Previous Message Stephan Szabo 2001-06-06 15:41:27 Re: Tutorial : using foreign keys, retrictions etc