Skip site navigation (1) Skip section navigation (2)

Re: Additional Help Desired in Application Port to PostgreSQL

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: David Wheeler <david(at)kineticode(dot)com>
Cc: pdxpug(at)postgresql(dot)org
Subject: Re: Additional Help Desired in Application Port to PostgreSQL
Date: 2006-07-21 19:11:18
Message-ID: Pine.LNX.4.64.0607211206180.19612@salmo.appl-ecosys.com (view raw or flat)
Thread:
Lists: pdxpug
On Fri, 21 Jul 2006, David Wheeler wrote:

> I was more looking for possible SQL errors in the error log?

David,

   I think I've discovered a major source of problems: some table and field
names are defined (in install/xrms-schema.xml) with quoted names, but used
in sql statements without quotes. This is a no-no in postgres; I guess mysql
has no issue with it. Here's an example:

[rshepard(at)salmo /var/www/htdocs/xrms]$ egrep -rn account_status_record_status *
admin/import/import-companies.php:57:        account_status_record_status = 'a'";
admin/account-statuses/some.php:21:$sql = "select * from account_statuses where account_status_record_status = 'a' order by account_status_id";
admin/account-statuses/delete.php:27:$rec['account_status_record_status'] = 'd';
companies/edit.php:89:$sql = "select account_status_pretty_name, account_status_id from account_statuses where account_status_record_status = 'a'";
companies/admin.php:45:$sql = "select account_status_pretty_name, account_status_id from account_statuses where account_status_record_status = 'a'";
install/xrms-schema.xml:293:    <field name="account_status_record_status" type="C" size="1">
install/.#xrms-schema.xml.1.18:293:    <field name="account_status_record_status" type="C" size="1">

   Notice that it's defined (last two lines) with quotes, but used either
without quotes or (in delete.php) with single quotes.

   If I'm correct that this is a problem, I guess that I'll start working my
way through all table and field names and make sure they're not quoted
anywhere.

Thanks,

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.(TM)    |            Accelerator
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

In response to

Responses

pdxpug by date

Next:From: Rich ShepardDate: 2006-07-21 19:31:14
Subject: Re: Additional Help Desired in Application Port to PostgreSQL
Previous:From: Rich ShepardDate: 2006-07-21 13:55:32
Subject: Additional Help Desired in Application Port to PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group