Search Postgresql Archives

Re: Porting from ORACLE to PostgSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux