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
On Sat, Feb 21, 2015 at 4:58 PM, Eric Hanson e...@aquameta.com 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
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
On Sun, Feb 22, 2015 at 11:42 AM, Adrian Klaver adrian.kla...@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
On Sun, Feb 22, 2015 at 11:47 AM, Tom Lane t...@sss.pgh.pa.us wrote:
Eric Hanson elhan...@gmail.com 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
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
Eric Hanson elhan...@gmail.com writes:
On Sun, Feb 22, 2015 at 11:47 AM, Tom Lane t...@sss.pgh.pa.us 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
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 (
r
Eric Hanson elhan...@gmail.com 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
On Sun, Feb 22, 2015 at 11:42 AM, Adrian Klaver adrian.kla...@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
On Sun, Feb 22, 2015 at 12:56 PM, Tom Lane t...@sss.pgh.pa.us 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
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 (
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 (
13 matches
Mail list logo