Re: array in composite type ?

From: Cem Kücük <bcemkucuk(at)gmail(dot)com>
To: pgsql-tr-genel(at)postgresql(dot)org
Subject: Re: array in composite type ?
Date: 2016-12-29 10:50:18
Message-ID: CAMURDFPxHP=ioz12=JRHy5zNztnA=+CQtqQueOsPtxLJbMSriQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-tr-genel

postgres kismini yanlis kopyalamisim:

CREATE TYPE class_mapping AS
(id bigint,
klasse bigint,
text character varying(500)
);

CREATE TYPE class_mapping_tab AS
(class_mapping_tab class_mapping[]);

2016-12-29 11:42 GMT+01:00 Cem Kücük <bcemkucuk(at)gmail(dot)com>:

> Selam arkadaslar,
>
> asagidaki oracle dan migrate edilmis iki custom tip var..
>
> oracle
> --------------
> create or replace
> TYPE CLASS_MAPPING_TAB IS TABLE OF class_mapping;
>
> create or replace
> TYPE CLASS_MAPPING IS OBJECT (
> ID NUMBER,
> klasse NUMBER,
> text VARCHAR2 (500 CHAR)
> );
>
>
> postgres:
> --------------------------
> TYPE class_mapping_tab AS
> class_mapping_tab class_mapping[];
>
> TYPE CLASS_MAPPING IS OBJECT (
> ID NUMBER,
> klasse NUMBER,
> text VARCHAR2 (500 CHAR)
> );
>
> Sizce bu ne kadar dogru bir konvert ?
>
> class_mapping_tab nasil set edebilirim ?
>
> asagidaki gibi olmadi
> ..
> tmpval RECORD;
> retval class_mapping_tab;
> retval := array[ ROW(tmpval.ID, tmpval.klasse, tmpval.text) ::
> class_mapping)];
> ..
>
> saygilar,
> kuecuek
>

In response to

Responses

Browse pgsql-tr-genel by date

  From Date Subject
Next Message Eren Başak 2016-12-29 11:02:10 Re: array in composite type ?
Previous Message Cem Kücük 2016-12-29 10:42:24 array in composite type ?