From: | Thomas Hallgren <thhal(at)mailblocks(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Returning a RECORD, not SETOF RECORD |
Date: | 2005-04-21 22:24:26 |
Message-ID: | 4268281A.4080006@mailblocks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
I just discovered that my previous post concerning this had the same
subject line as a discussion that took place in January. I'm not asking
the same question though, so here I go again with my question about
syntax and feasibility.
I do the following:
CREATE FUNCTION xyz(int, int) RETURNS RECORD AS '...'
CREATE TABLE abc(a int, b int);
Now I want to call my xyz function once for each row in abc and I want
my RECORD to be (x int, y int, z timestamptz). How do I write that
query? I.e. where do specify my RECORD definition? Is it possible at
all? Ideally I'd like to write something like this:
SELECT xyz(a, b) AS (x int, y int, z timestamptz) FROM abc;
but that yields a syntax error.
Regards,
Thomas Hallgren
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-04-21 23:01:02 | Re: timezone() with timeofday() converts the wrong direction? |
Previous Message | Steve - DND | 2005-04-21 21:24:54 | Re: timezone() with timeofday() converts the wrongdirection? |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-04-21 22:26:18 | Re: Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords |
Previous Message | Bruce Momjian | 2005-04-21 22:20:05 | Re: Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords |