[GENERAL] express composite type literal as text

2015-02-22 Thread Eric Hanson
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

Re: [GENERAL] express composite type literal as text

2015-02-22 Thread Eric Hanson
n exception to a rule that is generally true and aimed for, or is that just not a good assumption? Thanks, Eric On Sun, Feb 22, 2015 at 11:42 AM, Adrian Klaver wrote: > On 02/22/2015 10:07 AM, Eric Hanson wrote: > > Hi, > > > > How do I express a composite type literal as text?

Re: [GENERAL] express composite type literal as text

2015-02-22 Thread Eric Hanson
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

Re: [BUGS] [GENERAL] express composite type literal as text

2015-02-22 Thread Eric Hanson
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

Re: [GENERAL] express composite type literal as text

2015-02-22 Thread Eric Hanson
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

[GENERAL] express composite type literal as text

2015-02-22 Thread Eric Hanson
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

[GENERAL] express composite type literal as text

2015-02-22 Thread Eric Hanson
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

Re: [GENERAL] Aquameta 0.1 - Request for reviews, contributors

2017-09-12 Thread Eric Hanson
Thanks Nico. I definitely like this syntax better. -- Eric Hanson CEO, Aquameta Labs 503-929-1073 www.aquameta.com On Fri, Sep 8, 2017 at 4:26 PM, Nico Williams wrote: > > Here's a review comment. Just one for now. > > Looking at the meta module, I see things like this: &g