Re: Anyone particularly wedded to func_tlist mechanism?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Bitmead <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Anyone particularly wedded to func_tlist mechanism?
Date: 2000-08-04 06:30:21
Message-ID: 1051.965370621@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chris Bitmead <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)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 | advil
mike | posthacking | peet's coffee
joe | basketball | hightops
sally | 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-08-04 06:43:45 Re: comparing rows
Previous Message Hiroshi Inoue 2000-08-04 02:41:21 RE: Raw constraint & pg_relcheck.rcsrc