|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi..
I'm trying to port an Access database application (written in ASP) to PostgreSQL. My problem is this: Every SQL statement I make HAS TO have double quotes around tablenames og columnnames. If not... then either "ERROR: Relation "tbl_name does not exist" or ERROR: "Attribute 'columnname' not found" is thrown. The PostgreSQL user manual states that both statement types are valid. Now, if I have to include double quotes around every table/column name then I have to rewrite every single SQL statement in the whole application (there are a lot!). I'm trying to convince my collegues that PostgreSQL is the cheapest and most efficient way to sell our product.... cheaper than SQL Server. So a suggestion how to fix this would be nice. Maybe it's a flag in postmaster or something??? I'm using ODBC to connect to the database. Thanks. |
|
#2
|
|||
|
|||
|
See http://www.postgresql.org/idocs/ind...TAX-IDENTIFIERS
The problem in your case is that you used quotes when creating the tablenames, so you are stuck with using quotes to query the tables. If you re-do your SQL creation statements to NOT use quotes, then all tablenames and column names are wrapped to lower-case, and you will have no problem. Note: if you used some sort of third-party tool, such as phpPgAdmin, or PgAdmin, etc... to create your tables, the quotes were probably automatic. Try just manually editing your table creation statements, saving to a text file, and then piping that text file to the psql terminal.
__________________
The real n-tier system: FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL Amazon wishlist -- rycamor (at) gmail.com |
![]() |
| Viewing: Dev Shed Forums > Databases > PostgreSQL Help > PostgreSQL and double quotes (") |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|