Sunil Harak
Sunil Harak

Reputation: 249

oracle to postgres migration table type issue

enter image description here

As shown in the image I'm facing this issue

I'm getting syntax error.

Upvotes: 0

Views: 369

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 246493

PostgreSQL and Oracle are two different relational database systems.

They have different SQL dialects, and the stored procedure languages PL/SQL and PL/pgSQL are somewhat similar, but different when you get to the details.

You probably want to translate

TYPE mytype IS TABLE OF mytab.mycol%TYPE;
myvar mytype;

to

myvar mycoltype[];

(assuming that mytab.mycol is of type mycoltype.)

The syntax will be different, but you can do similar things.

Upvotes: 2

Related Questions