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,
>
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
);
CREATE TYPE inventory_item AS (
na
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
);
CREATE TYPE inventory_item AS (
na
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:56 PM, Tom Lane wrote:
> Well, it's an unimplemented feature anyway. I poked into it and noticed
> that the equivalent case for arrays works, because that operator is
> "anyarray = anyarray". enforce_generic_type_consistency() observes that
> we have an unknown litera
Eric Hanson writes:
> On Sun, Feb 22, 2015 at 11:47 AM, Tom Lane wrote:
>> Now, I'm not too sure *why* it's making you do that --- seems like the
>> default assumption ought to be that the literal is the same type as
>> the variable it's being compared to. Perhaps there's a bug in there,
>> or p
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 (
>
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 (
r double precision,
i double precision
);
CREATE TYP
13 matches
Mail list logo