Re: express composite type literal as text

Поиск
Список
Период
Сортировка
От Eric Hanson
Тема Re: express composite type literal as text
Дата
Msg-id CACA6kxgGN=02BVVH8cCY3ecSrewaagcgd+CfrUg9pd8em-NV-g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: express composite type literal as text  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Sun, Feb 22, 2015 at 11:42 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

test=> select * from on_hand where item = '("fuzzy dice",42,1.99)'::inventory_item;

          item          | count
------------------------+-------
 ("fuzzy dice",42,1.99) |  1000
(1 row)

So, you have to do the explicit cast?  It looks like it.  That's not ideal, we have relied on the assumption that all values (except for NULL) can be represented as text strings, and PostgreSQL will auto-cast the text to the appropriate type.  Is this case just an exception to a rule that is generally true and aimed for, or is that just not a good assumption?

Thanks,
Eric

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

Предыдущее
От: Eric Hanson
Дата:
Сообщение: Re: [BUGS] express composite type literal as text
Следующее
От: Eric Hanson
Дата:
Сообщение: express composite type literal as text