From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joseph S <jks@selectacast.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: ERROR: function expression in FROM may not refer to other relations of same query level
Date: Wed, 08 Jul 2009 21:58:51 -0400
Message-ID: <16881.1247104731@sss.pgh.pa.us> (raw)
In-Reply-To: <h33got$17dc$1@news.hub.org>
References: <h33got$17dc$1@news.hub.org>
Joseph S <jks@selectacast.net> writes:
> Supposed I have this table:
> create temp table tempa (ids int[]);
> insert into tempa SELECT ARRAY[1 , 2, 3];
> Now how do I get output from that?
Uh, you didn't actually say what output you're looking for, but
I'm going to guess it's this:
regression=# select unnest(ids) from tempa;
unnest
--------
1
2
3
(3 rows)
Pre-8.4, you need a version of unnest() that's coded in C or SQL;
plpgsql won't do.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, jks@selectacast.net
Subject: Re: ERROR: function expression in FROM may not refer to other relations of same query level
In-Reply-To: <16881.1247104731@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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