Re: Anyone particularly wedded to func_tlist mechanism? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Anyone particularly wedded to func_tlist mechanism?
Date
Msg-id 1051.965370621@sss.pgh.pa.us
Whole thread Raw
In response to Re: Anyone particularly wedded to func_tlist mechanism?  (Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>)
List pgsql-hackers
Chris Bitmead <chrisb@nimrod.itg.telstra.com.au> writes:
> At some stage I'd like to be able to query fields by odbms style
> navigation. Like select * from person where person.garage.car.colour =
> 'red'. Just keep that in mind with any change you do.

AFAICS what I have in mind doesn't affect that one way or the other.
The main problem you'll have to deal with is the tension between single
values and sets.  If you try it now with the regression database:

regression=# SELECT p.name, p.hobbies.name, p.hobbies.equipment.name FROM ONLY
person p;name  |    name     |     name
-------+-------------+---------------mike  | posthacking | advilmike  | posthacking | peet's coffeejoe   | basketball
|hightopssally | basketball  | hightops
 
(4 rows)

regression=# SELECT p.name, p.hobbies.name, p.hobbies.equipment.name FROM ONLY
regression-# person p where p.hobbies.equipment.name  = 'hightops';
ERROR:  An operand to the '=' operator returns a set of text,       but '=' takes single values, not sets.

This is not just the parser being unreasonably picky: it's protecting
execQual.c, which has no idea what to do with set-valued qual
expressions.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: Raw constraint & pg_relcheck.rcsrc
Next
From: Thomas Lockhart
Date:
Subject: Re: comparing rows