Re: ORDB and dot-notation query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "ALLs(dot)org" <info(at)alls(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: ORDB and dot-notation query
Date: 2009-11-11 04:36:50
Message-ID: 27602.1257914210@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"ALLs.org" <info(at)alls(dot)org> writes:
> select * from clients WHERE
> address.country.tld = 'de'

> address and country are custom table and TYPE

> I receive error:
> ERROR: schema "adress" does not exist*

Yup, because the SQL standard says that a.b.c means column c in table b
in schema a. You need to write
(address.country).tld
to get the parser started in the right direction.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message bujjibabu 2009-11-13 14:27:29 Caliculating Business Days and adding business days usefull functions for developers
Previous Message ALLs.org 2009-11-11 04:27:06 Re: ORDB and dot-notation query