Re: Proposal: casts row to array and array to row

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Proposal: casts row to array and array to row
Дата
Msg-id CAHyXU0yLdGKChEdPHEtjYkv=-Py-Zdcon2ipFe4Vo8ku-jYp3g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal: casts row to array and array to row  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Oct 11, 2011 at 8:36 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> 2011/10/11 Robert Haas <robertmhaas@gmail.com>:
>>> On Tue, Oct 11, 2011 at 4:40 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>>>> What do you think about this idea?
>
> It's a bad one.
>
>>> Well, a ROW can contain values of different types; an ARRAY can't.
>
>> yes, I know - but it should be problem only in few cases - when is not
>> possible to cast a row field to array field.
>
> This idea is basically the same as "data types don't matter", which is
> not SQL-ish and certainly not Postgres-ish.

hm. I agree, but if it were possible to create sql/plpgsql functions
accepting 'record', then you could at least rig the cast in userland
around hstore without resorting to hacky text manipulation and/or
flattening the record to text before doing the operation.

merlin


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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Range Types - typo + NULL string constructor
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: SET variable - Permission issues