arrays and insert/select

Поиск
Список
Период
Сортировка
От nolan@celery.tssi.com
Тема arrays and insert/select
Дата
Msg-id 20030528234455.2513.qmail@celery.tssi.com
обсуждение исходный текст
Ответы Re: arrays and insert/select  (Joe Conway <mail@joeconway.com>)
Список pgsql-general
I'm loading a table from another (in 7.3.2) and need to build a
varchar array from a varchar column in the source table.

   INSERT into X (ArrayCol) select oldval from Y;

gets a type error, but you can't cast to an array.

    INSERT into X (ArrayCol[1]) select oldval from Y;

doesn't work either.

    INSERT into X (ArrayCol) select '{"' || oldval || '"}' from Y;

also doesn't work.

There doesn't appear to be a to_array function.

Any suggestions?
--
Mike Nolan



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

Предыдущее
От: "Andy Kriger"
Дата:
Сообщение: how much does a connection cost?
Следующее
От: Paul Thomas
Дата:
Сообщение: Re: change log 7.3.3