Re: Return SETOF or array from pl/python

From: Peter Fein <pfein(at)pobox(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Postgresql-General list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Return SETOF or array from pl/python
Date: 2005-07-15 22:21:23
Message-ID: 42D836E3.50503@pobox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joshua D. Drake wrote:

> You would actually have to have a set. What I believe you are trying to
> do is transform a list to a result set. I don't think you can do that
> without some additional programming within the function.
>
> Somebody may know of a better way but what I would think would happen is
> this:
>
> Break up list, insert each value of list into a temp table as a row,
> return set of temp table.

Is there a way to represent a set of constant rows in SQL, aside from
creating a temp table & populating it? I've had need of this before -
IIRC, something was mentioned about the SQL VALUES construct being
unimplemented.

--
Peter Fein pfein(at)pobox(dot)com 773-575-0694

Basically, if you're not a utopianist, you're a schmuck. -J. Feldman

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas F. O'Connell 2005-07-15 23:38:30 Re: ERROR: could not open relation
Previous Message Martijn van Oosterhout 2005-07-15 21:25:49 Re: how to insert '\\' in postgres database using java