Обсуждение: TYPE TABLE OF NUMBER

Поиск
Список
Период
Сортировка

TYPE TABLE OF NUMBER

От
utsav
Дата:
we are doing mgration activity form oracle to postgresql 9.1

How to convert this type :

ORACLE :

 CREATE OR REPLACE TYPE "NUMBER_ARRAY" IS TABLE OF NUMBER

please let me know how we can achive this in postgresql


My understanding

POSTGRESQL :

CREATE TYPE "NUMBER_ARRAY" AS (arr int);

Appreciate any help !

--
View this message in context: http://postgresql.1045698.n5.nabble.com/TYPE-TABLE-OF-NUMBER-tp5710983.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Re: TYPE TABLE OF NUMBER

От
Raghavendra
Дата:
On Fri, Jun 1, 2012 at 9:18 PM, utsav <utsav.pshah@tcs.com> wrote:
we are doing mgration activity form oracle to postgresql 9.1

How to convert this type :

ORACLE :

 CREATE OR REPLACE TYPE "NUMBER_ARRAY" IS TABLE OF NUMBER

please let me know how we can achive this in postgresql


My understanding

POSTGRESQL :

CREATE TYPE "NUMBER_ARRAY" AS (arr int);

Appreciate any help !


Does this helps ?

Re: TYPE TABLE OF NUMBER

От
utsav
Дата:
No.. in this we have to define domain and than used it . Our requirenment is
like application pass the array of integer and that we have to use in
PostgreSQL functions.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/TYPE-TABLE-OF-NUMBER-tp5710983p5711116.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Re: TYPE TABLE OF NUMBER

От
Thomas Kellerer
Дата:
utsav, 04.06.2012 07:00:
> No.. in this we have to define domain and than used it . Our requirenment is
> like application pass the array of integer and that we have to use in
> PostgreSQL functions.
>

You can pass an array directly. There is no need to define an "array type" in PostgreSQL



Re: TYPE TABLE OF NUMBER

От
utsav
Дата:
Hi thomas .. Thanks for your help . I have done that thing .  ]

It is working fine




--
View this message in context: http://postgresql.1045698.n5.nabble.com/TYPE-TABLE-OF-NUMBER-tp5710983p5711247.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Re: TYPE TABLE OF NUMBER

От
Igor Neyman
Дата:

> -----Original Message-----
> From: utsav [mailto:utsav.pshah@tcs.com]
> Sent: Monday, June 04, 2012 1:00 AM
> To: pgsql-general@postgresql.org
> Subject: Re: TYPE TABLE OF NUMBER
>
> No.. in this we have to define domain and than used it . Our
> requirenment is like application pass the array of integer and that we
> have to use in PostgreSQL functions.
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/TYPE-TABLE-OF-NUMBER-
> tp5710983p5711116.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.

PostgreSQL has already "integer array" type: _int4 or _int2 (or whatever integer length you need).
No need to create new type.

Regards,
Igor Neyman