Lists: | pgsql-sql |
---|
From: | "ALLs(dot)org" <info(at)alls(dot)org> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | ORDB and dot-notation query |
Date: | 2009-11-11 04:11:24 |
Message-ID: | 17189cdf0911102011t16863599qa68318b25d2b86dc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Hi,
I have problem with ORDB.
When exec query:
select * from clients WHERE
address.country.tld = 'de'
address and country are custom table and TYPE
I receive error:
*SQL error:
ERROR: schema "adress" does not exist*
Do somebody have some problem and how to fix this?
Thanks
From: | Richard Broersma <richard(dot)broersma(at)gmail(dot)com> |
---|---|
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:15:48 |
Message-ID: | 396486430911102015kee20c94jb2dde8c00294e766@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
On Tue, Nov 10, 2009 at 8:11 PM, ALLs.org <info(at)alls(dot)org> wrote:
> I have problem with ORDB.
>
> When exec query:
>
> select * from clients WHERE
> address.country.tld = 'de'
>
> address and country are custom table and TYPE
>
> I receive error:
>
> SQL error:
> ERROR: schema "adress" does not exist
>
> Do somebody have some problem and how to fix this?
Are you sure that you didn't just misspell address?
--
Regards,
Richard Broersma Jr.
Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug
From: | "ALLs(dot)org" <info(at)alls(dot)org> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: ORDB and dot-notation query |
Date: | 2009-11-11 04:27:06 |
Message-ID: | 17189cdf0911102027p74126eb2p575a60a95b1f8f91@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
This is tipfeler when writing mail, but in database it is 100% ok like
below:
I'm also using Windows version, can this be reason of problem?
When exec query:
select * from clients WHERE
adress.country.tld = 'de'
adress and country are custom table and TYPE
I receive error:
*SQL error:
ERROR: schema "adress" does not exist*
Thanks
On Wed, Nov 11, 2009 at 5:15 AM, Richard Broersma <
richard(dot)broersma(at)gmail(dot)com> wrote:
> On Tue, Nov 10, 2009 at 8:11 PM, ALLs.org <info(at)alls(dot)org> wrote:
>
> > I have problem with ORDB.
> >
> > When exec query:
> >
> > select * from clients WHERE
> > address.country.tld = 'de'
> >
> > address and country are custom table and TYPE
> >
> > I receive error:
> >
> > SQL error:
> > ERROR: schema "adress" does not exist
> >
> > Do somebody have some problem and how to fix this?
>
> Are you sure that you didn't just misspell address?
>
>
> --
> Regards,
> Richard Broersma Jr.
>
> Visit the Los Angeles PostgreSQL Users Group (LAPUG)
> http://pugs.postgresql.org/lapug
>
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 |
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