Re: Using unnest

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Using unnest
Дата
Msg-id 1248556492.6158.313.camel@jdavis
обсуждение исходный текст
Ответ на Re: Using unnest  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: Using unnest
Список pgsql-general
On Sat, 2009-07-25 at 22:54 +0200, Thomas Kellerer wrote:
> Do I understand this correctly that by casting it first to text, I effectively create a new array
> the same way I create one, when I supply a literal like '{1,2,3}'::text[]

Similar, but not quite the same. '{1,2,3}'::text[] is actually
constructing from the cstring type using the type input function.
Cstring is not a normal type, it is what things are before they have a
normal type.

So, my strategy will only work if the array type you're trying to cast
to has a cast from text.

There aren't separate input functions for each array type, so it's hard
to make this work without depending on a cast from text. Perhaps someone
else has a better idea, though.

Regards,
    Jeff Davis


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

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: where is pg_resetxlog ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: where is pg_resetxlog ?