Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group