Обсуждение: case sensitiv table and column names

Поиск
Список
Период
Сортировка

case sensitiv table and column names

От
Matthias Meyer
Дата:
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

От
EDWARD POTTER
Дата:
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

Вложения

Re: case sensitiv table and column names

От
"Dan Wilson"
Дата:
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