Re: Oracle/PostgreSQL incompatibilities

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: rainer(dot)klute(at)epost(dot)de
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, klute(at)rainer-klute(dot)de
Subject: Re: Oracle/PostgreSQL incompatibilities
Date: 2003-10-03 15:35:28
Message-ID: 1065195327.24240.43.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

If true, this would be a bug. Do you have a reproducible test case?

> + 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.

Agreed for 7.5.

> + 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.

7.4 implements the 200N proposed sequence names -- which are nearly
equivalent to the Oracle definition (I believe RESTART WITH is missing
in Oracle).

> + Indexes and table constraints share the same namespace.

Well.. some constraints are implemented via indexes. The index doesn't
conflict with the constraint name, it conflicts with the index name --
but they share the same name.

Anyway, the way to do this is better hide the implementation of a unique
or primary key constraint. Or allow for empty, invalid or missing names
in those cases. For example, constraint index names could be the OID of
the constraint. Since a fully numerical name is invalid, this would
effectively remove the problem.

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

From what I can tell, PostgreSQL doesn't support NUMBER at all. Numeric
is the SQL specified version.

dev_iqdb=# select 5::numeric;
numeric
---------
5
(1 row)

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

nextval('') has dependency tracking issues, so needs to be changed.

The debate is whether to support Oracle or DB2 syntax for next value of
indexes. Oracle syntax is more common, DB2 syntax is in the SQL 200N
proposal.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2003-10-03 15:44:42 Re: Question regarding coopting Database Engine
Previous Message Tom Lane 2003-10-03 15:34:04 Re: Using backslash in query