Re: Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL - Mailing list pgsql-hackers

From Don Baccus
Subject Re: Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL
Date
Msg-id 3.0.1.32.20001115110906.00a15c00@mail.pacifier.com
Whole thread Raw
In response to Re: Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL  (markw <markw@mohawksoft.com>)
List pgsql-hackers
At 01:53 PM 11/15/00 -0500, markw wrote:

>I'd rather not pollute the application's SQL with postgres-isms. Not that I
>don't love postgres, but there are always critics looking for a reason to use
>Oracle or (gasp) MS-SQL.

Define some global variable with the name of the database being run (currently
only Postgres) and guard the SET statement with a conditional...

In the OpenACS project we've got little functions that return query snippets
called things like "db_nextval" that return either "sequence_name.nextval"
or "nextval('sequence_name')" depending on whether the code's running
under Oracle or Postgres.  That helps us minimize differences in the source.




- Don Baccus, Portland OR <dhogaza@pacifier.com>
  Nature photos, on-line guides, Pacific Northwest
  Rare Bird Alert Service and other goodies at
  http://donb.photo.net.

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Syslog Facility Patch
Next
From: Tom Lane
Date:
Subject: Re: Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL