On 2/21/15 7:35 PM, Eric Hanson wrote:
Hi,
I'm trying to use a composite type in a WHERE clause, as described here:
http://www.postgresql.org/docs/9.4/static/rowtypes.html
Just pasting in the examples I get:
CREATE TYPE complex AS (
r double precision,
i double precision
On Sat, Feb 21, 2015 at 4:58 PM, Eric Hanson wrote:
> Hi,
>
> I'm trying to use a composite type in a WHERE clause, as described here:
>
> http://www.postgresql.org/docs/9.4/static/rowtypes.html
>
> Just pasting in the examples I get:
>
> CREATE TYPE complex AS (
> r double precision,
>
On Sun, Feb 22, 2015 at 11:42 AM, Adrian Klaver
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 c
On Sun, Feb 22, 2015 at 12:18:21PM -0800, Eric Hanson wrote:
> Got it. Ok, I'm reporting this as a bug. Is this a bug? Being able to
> always express literals as text is a really valuable assumption to be able
> to rely on.
If I had to guess (I guess someone more authoritative than I will
chime
On Sun, Feb 22, 2015 at 11:47 AM, Tom Lane wrote:
> Eric Hanson writes:
> > How do I express a composite type literal as text?
>
> The rules are given in the manual ...
>
> > I can't use the ROW() notation, because all values need to be represented
> > as text over a REST api. But I can't seem
On Sun, Feb 22, 2015 at 11:42 AM, Adrian Klaver
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 c
Eric Hanson writes:
> How do I express a composite type literal as text?
The rules are given in the manual ...
> I can't use the ROW() notation, because all values need to be represented
> as text over a REST api. But I can't seem to get the text-based syntax to
> work:
> select * from on_hand
On 02/22/2015 10:07 AM, Eric Hanson wrote:
> Hi,
>
> How do I express a composite type literal as text?
>
> I'm trying to use a composite type in a WHERE clause. The examples in
> the docs
>
> http://www.postgresql.org/docs/9.4/static/rowtypes.html
>
> say:
>
> CREATE TYPE complex AS (
>