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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Fri, 21 Jul 2006 12:11:18 -0700 (PDT)
  • Message-id: <Pine(dot)LNX(dot)4(dot)64(dot)0607211206180(dot)19612(at)salmo(dot)appl-ecosys(dot)com>

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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group