Aliasing syntax question

Поиск
Список
Период
Сортировка
От Kevin Murphy
Тема Aliasing syntax question
Дата
Msg-id 499D95E1.2080904@genome.chop.edu
обсуждение исходный текст
Ответы Re: Aliasing syntax question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Mirko Pace
Дата:
Сообщение: Re: How to pipe the psql copy command to Unix 'Date' command
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to pipe the psql copy command to Unix 'Date' command