From: | Eric Hanson <eric(at)aquameta(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: express composite type literal as text |
Date: | 2015-02-22 19:53:30 |
Message-ID: | CACA6kxgGN=02BVVH8cCY3ecSrewaagcgd+CfrUg9pd8em-NV-g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-general |
On Sun, Feb 22, 2015 at 11:42 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Eric Hanson | 2015-02-22 19:55:42 | Re: express composite type literal as text |
Previous Message | Tom Lane | 2015-02-22 19:47:52 | Re: express composite type literal as text |
From | Date | Subject | |
---|---|---|---|
Next Message | Eric Hanson | 2015-02-22 19:55:42 | Re: express composite type literal as text |
Previous Message | Scott Marlowe | 2015-02-22 19:53:11 | Re: Postgres architecture for multiple instances |