Aliasing syntax question - Mailing list pgsql-general

From Kevin Murphy
Subject Aliasing syntax question
Date
Msg-id 499D95E1.2080904@genome.chop.edu
Whole thread Raw
Responses Re: Aliasing syntax question
List pgsql-general
I've now seen the 'unnest' function defined in a few different ways with
regard to aliases.

Substitute the following pairs of values for X and Y in the query below,
and all of them work (in PG 8.3.6, at least):

X   Y
g    g
i     g(i)
g    g(i)
g.i  g(i)

create or replace function unnest(anyarray)
returns setof anyelement as $$
select $1[X] from generate_series(array_lower($1,1),array_upper($1,1)) Y;
$$ language sql;

Please enlighten the unworthy!

Thanks,
Kevin Murphy


pgsql-general by date:

Previous
From: Mirko Pace
Date:
Subject: Re: How to pipe the psql copy command to Unix 'Date' command
Next
From: Tom Lane
Date:
Subject: Re: How to pipe the psql copy command to Unix 'Date' command