Re: Connecting a postgresql client to an oracle7 db - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Connecting a postgresql client to an oracle7 db
Date
Msg-id web-687601@davinci.ethosmedia.com
Whole thread Raw
In response to Re: Connecting a postgresql client to an oracle7 db  (Dominique Duflos <Dominique.Duflos@alcatel.fr>)
Responses Re: Connecting a postgresql client to an oracle7 db  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Domenique,

> Ah... Reading the FAQs of PostgresQL and learning that SQL was very
> standardized, I had thought I could write an application that could
> connect to any SQL-implementing database on our intranet.

You can.  You just need to use each database's *external* interfaces,
 through ODBC, JDBC, or similar data transmission tools.  Psql, like
 Microsoft's Query Analyzer, connects with the database at a more
 "intimate" level where commands are sent directly in the database's
 internal API ... which is *never* standard.  But with Java, Perl, PHP,
 C++ or COM you should ba able to write an application that connects to
 all SQL databases.

HOWEVER, Postgres upholds only about 80% of the standard, and most
 other databases have less.  Oracle, for example, uses a completely
 non-standard notation for Outer Joins that is not compatible with any
 other database, nor will it recognize SQL standard syntax for Outer
 Joins.  This will remain a problem for you even when you use JDBC or
 similar to connect.

If you are going to go ahead with this project, I suggest that you:
1. Read the various "porting" documents at
 http://techdocs.postgresql.org/
2. Buy a copy of "SQL In a Nutshell" from O'Reilly, which has
 feature-for-feature and command-by-command comparison of Postgres,
 MySQL, Oracle, and SQL Server (though it is 1.5 years out of date).
3. REsearch on the Net.  It may be that some kind of "database
 compatibility layer" that allows you to use a single standard syntax
 to address all of your databases exists somewhere, either as Open
 Source or for a fee.
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cursors in PL/pgSQL
Next
From: Tom Lane
Date:
Subject: Re: Connecting a postgresql client to an oracle7 db