Re: Array manipulation/syntax question

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Array manipulation/syntax question
Дата
Msg-id 20050510015834.GA65179@winnie.fuhr.org
обсуждение исходный текст
Ответ на Array manipulation/syntax question  (Bart Grantham <bart@logicworks.net>)
Список pgsql-general
On Mon, May 09, 2005 at 07:05:18PM -0400, Bart Grantham wrote:
>
> Let me put it this way... how do I do this:
>
> -- my_array is an INT[]
>
> _my_array := select some_column from some_table;

In PostgreSQL 7.4 and later you can use an array constructor:

  my_array := ARRAY(SELECT some_column FROM some_table);

See "Array Constructors" in the "Value Expressions" section of the
"SQL Syntax" chapter of the documentation:

http://www.postgresql.org/docs/8.0/interactive/sql-expressions.html#SQL-SYNTAX-ARRAY-CONSTRUCTORS

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

В списке pgsql-general по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Array manipulation/syntax question
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL