Re: Oracle/PostgreSQL incompatibilities - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: Oracle/PostgreSQL incompatibilities
Date
Msg-id 1065195327.24240.43.camel@jester
Whole thread Raw
In response to Oracle/PostgreSQL incompatibilities  (Rainer Klute <rainer.klute@epost.de>)
List 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.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using backslash in query
Next
From: "scott.marlowe"
Date:
Subject: Re: Question regarding coopting Database Engine