Thread: case sensitiv table and column names

case sensitiv table and column names

From
Matthias Meyer
Date:
Hallo Mailinglist

If I use PostgreSQL from PHP3 with pg_exec($db,"SELECT * FROM
Kunden"); I get an error like "Warning: PostgresSQL query failed: ERROR:
kunden: Table does not exist."
Thats right because the table called "Kunden" with an upper K.

What should I do that PHP/PostgreSQL accept case sensitiv table names ?

:-)Matthias

Re: case sensitiv table and column names

From
EDWARD POTTER
Date:
Is there any reason why u can't use kunden?

I guess since PHP is open source [and so is Postgres] u could probably hack
that code on your own to accept either upper or lower case names.

On the other hand,  maybe there is a simpler solution, but I have not yet
stumbled on it...

!ed


> Hallo Mailinglist
>
> If I use PostgreSQL from PHP3 with pg_exec($db,"SELECT * FROM
> Kunden"); I get an error like "Warning: PostgresSQL query failed: ERROR:
> kunden: Table does not exist."
> Thats right because the table called "Kunden" with an upper K.
>
> What should I do that PHP/PostgreSQL accept case sensitiv table names ?
>
> :-)Matthias

Attachment

Re: case sensitiv table and column names

From
"Dan Wilson"
Date:
Just put Kunden  in quotes:

pg_exec($db,"SELECT * FROM \"Kunden\"");

-Dan

----- Original Message -----
From: "Matthias Meyer" <m.meyer@maxonline.at>
To: <pgsql-php@postgresql.org>
Sent: Saturday, July 15, 2000 6:45 AM
Subject: case sensitiv table and column names


> Hallo Mailinglist
>
> If I use PostgreSQL from PHP3 with pg_exec($db,"SELECT * FROM
> Kunden"); I get an error like "Warning: PostgresSQL query failed: ERROR:
> kunden: Table does not exist."
> Thats right because the table called "Kunden" with an upper K.
>
> What should I do that PHP/PostgreSQL accept case sensitiv table names ?
>
> :-)Matthias