PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 1st, 2002, 08:29 AM
halli halli is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 1 halli User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation PostgreSQL and double quotes (")

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.

Reply With Quote
  #2  
Old August 2nd, 2002, 09:19 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Pembroke Pines, Florida, USA
Posts: 2,300 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 3 h 12 m 27 sec
Reputation Power: 56
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > PostgreSQL and double quotes (")


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT