Oracle/PostgreSQL incompatibilities

From: Rainer Klute <rainer(dot)klute(at)epost(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Cc: klute(at)rainer-klute(dot)de
Subject: Oracle/PostgreSQL incompatibilities
Date: 2003-10-02 06:37:12
Message-ID: 20031002083712.011a142b.klute@rainer-klute.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ladies and Gentemen,

in a database project I ported an Oracle database definition to
PostgreSQL 7.3.2 as an aside. During this process I found a
couple of incompatibilities in the SQL dialects of both DBMS.

I compiled the following list for whatever it might be good for -
for example to transscribe Oracle DD statements to PostgreSQL DD
statements. Or to enhance PostgreSQL to increase Oracle
compatibility - as far as this might be sensible and desirable.
Or to establish a more comprehensive Oracle/PostgreSQL list.

Since this is nothing I am actively working on I don't expect any
response. However, if it should be useful for you, I'd appreciate
some feedback.

+ At least the following names are a) different and b)
PostgreSQL does not understand the Oracle equivalent:

Oracle: PostgreSQL:
VARCHAR2 varchar
NUMBER int
CLOB bytea
sysdate current_date

+ CREATE SCHEMA: Sometimes a schema created in PostgreSQL
disappears if there is nothing in it.

+ CREATE INDEX: PostgreSQL should allow specifying a namespace
for the index, even if the namespace is required to be the
same as the parent table. This would increase Oracle
compatibility.

+ CREATE SEQUENCE: Oracle allows (or requires) "INCREMENT BY"
instead of just "INCREMENT". Same for "START WITH" vs.
"START". Oracle allows explicit NOCYCLE and NOCACHE. It also
has a keyword ORDER.

+ Indexes and table constraints share the same namespace.

+ Oracle's DISABLE in foreign key specification in table
constraint is unknown by PostgreSQL.

+ PostgreSQL does not support Oracle's CREATE PUBLIC SYNONYM

+ PostgreSQL does not support the NUMBER keyword without (...)
i.e. something in parenthesis following it.

+ Oracle's SEQ_KATALOGID.nextval should be translated to
nextval('SEQ_KATALOGID').

Rainer Klute IT-Consulting GmbH
Dipl.-Inform.
Rainer Klute E-Mail: klute(at)rainer-klute(dot)de
Körner Grund 24 Telefon: +49 172 2324824
D-44143 Dortmund Telefax: +49 231 5349423

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-10-02 06:40:18 Re: 7.4 status
Previous Message Peter Eisentraut 2003-10-02 06:37:08 Re: 7.4 status