Re: Mapping Oracle types to PostgreSQL types - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Mapping Oracle types to PostgreSQL types
Date
Msg-id 22330.1066399516@sss.pgh.pa.us
Whole thread Raw
In response to Re: Mapping Oracle types to PostgreSQL types  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Mapping Oracle types to PostgreSQL types
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Jean-Michel POURE writes:
>> Is there a way to map Oracle nvarchar2(lenght) to PostgreSQL varchar(lenght)
>> in PostgreSQL 7.3? Are there plans to allow such mapping in the future using
>> the CREATE DOMAIN syntax?

> No to both.  Doing this would most likely require making the affected type
> names be reserved words in the grammar

Right.  At the moment, *all* the type names that support parenthesized
options are hard-wired into the grammar.  I think this is probably
unavoidable because otherwise there is a conflict between interpreting
"foo(3)" as a type name and interpreting it as a function call.  (But
if anyone can think of a way around that, I'm all ears.)

Since varchar(n) is SQL-standard syntax, can't you simply adopt the more
standard name for both databases?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Shridhar Daithankar
Date:
Subject: Re: Some thoughts about i/o priorities and throttling vacuum
Next
From: Alvaro Herrera
Date:
Subject: Re: Some thoughts about i/o priorities and throttling vacuum