Re: Porting from ORACLE to PostgSQL

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Porting from ORACLE to PostgSQL
Дата
Msg-id 1157477372.25225.5.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Porting from ORACLE to PostgSQL  (gustavo halperin <ggh.develop@gmail.com>)
Список pgsql-general
On Mon, 2006-09-04 at 16:54, gustavo halperin wrote:
> Hello
>
>  I need to porting many old ORACLE-oriented-SQL files and I have many
> problem with this code. Sometimes the code use some types not supported
> in PosgSQL like "number" or "varchar2", there fore, can I write some
> type of declaration (like in c : #define alias_name name) in order to
> make PosgSQL recognize these types? Or there are other solution that you
> recommend to use ?

If you just need a simple solution, look up domains:

http://www.postgresql.org/docs/8.1/static/sql-createdomain.html

specifically:

create domain varchar2 as varchar;

Note that you won't have a precision argument on the varchar2, but you
can put one on the varchar you use during domain creation:

This works:

create domain varchar2 as varchar(200);
create table test (info varchar);

This doesn't:
create domain varchar2 as varchar;
create table test (info varchar(200));

But once the tables are created, insert statements and such should work
normally.

В списке pgsql-general по дате отправления:

Предыдущее
От: Zlatko Matić
Дата:
Сообщение: Re: Upgrade Postgres 8.1.2 to 8.1.4
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Upgrade Postgres 8.1.2 to 8.1.4