Re: postgres cust types

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Ramesh T <rameshparnanditech(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Subject: Re: postgres cust types
Date: 2015-02-09 06:09:37
Message-ID: CAFj8pRB-rrifXdiMX5Ov4OAx4AvgbCop=j-F06tFAc3CKWnczg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2015-02-03 13:49 GMT+01:00 Ramesh T <rameshparnanditech(at)gmail(dot)com>:

> Hi ,
> i created type on postgres
> CREATE TYPE order_list AS (order_id bigint);
> it works fine.
>
> then, i try to create a other table type using above created type.
> like,
> --create or replace type suborder_list_table as table of suborder_list;
> this on *oracle *formate
>

This syntax is not supported in Pg - resp. a collections are not supported
by PostgreSQL.

use a arrays instead

DECLARE array_var order_list[];

http://www.postgresql.org/docs/9.4/static/arrays.html

Regards

Pavel Stehule

>
> i need to convert *postgres *and how to create a table type in postgres
> is it possible
> or
> else any other method.
>
> FYI,i am using these types in a function.
>
> thanks in advance,
>
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver 2015-02-09 07:52:05 Re: [GENERAL] Change postgresql encoding
Previous Message Pavel Stehule 2015-02-09 06:05:57 Re: dbmsscheduler