[SQL] ORDB and dot-notation query

2009-11-10 Thread ALLs.org
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


Re: [SQL] ORDB and dot-notation query

2009-11-10 Thread Richard Broersma
On Tue, Nov 10, 2009 at 8:11 PM, ALLs.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

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] ORDB and dot-notation query

2009-11-10 Thread ALLs.org
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 <
[email protected]> wrote:

> On Tue, Nov 10, 2009 at 8:11 PM, ALLs.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
>


Re: [SQL] ORDB and dot-notation query

2009-11-10 Thread Tom Lane
"ALLs.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

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql