Re: Assign User Defined DataType To Columns

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Phani Prathyush Somayajula <phani(dot)somayajula(at)pragmaticplay(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Assign User Defined DataType To Columns
Date: 2023-08-02 16:50:41
Message-ID: CAKFQuwYa6PDMPb8DjL+zQnEJYaOz-3mYa8uKbBpgO6ttsmMWAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgadmin-support pgsql-admin

Seriously, you sent this to three lists at the same time? I'm surprised it
came through moderation...

Anyway, my response on the admin list is below - though none of the lists
you picked were actually the appropriate one. You want the -general list.

On Wed, Aug 2, 2023 at 9:42 AM David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:

> On Wed, Aug 2, 2023 at 9:24 AM Phani Prathyush Somayajula <
> phani(dot)somayajula(at)pragmaticplay(dot)com> wrote:
>
>> Hi All,
>>
>>
>>
>> I’ve a user defined data type as :
>>
>> CREATE TYPE uibackend."_operation" (
>>
>
> If you find yourself writing user-space code that uses "_{data type}" you
> are doing something wrong. That implementation detail is not something
> that is exposed to the user. If you want to deal with arrays of a type you
> say: {data type}[]
>
> So casting some random text column to an array of operation is simply:
>
> operation_text_col::operation[]
>
> And you can get rid of the above CREATE TYPE command altogether.
>
> David J.
>
>

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Yogesh Mahajan 2023-08-03 03:48:56 [pgadmin-org/pgadmin4] e8fdf0: Fix incorrect redirection URL after authentication...
Previous Message David G. Johnston 2023-08-02 16:42:20 Re: Assign User Defined DataType To Columns

Browse pgadmin-support by date

  From Date Subject
Next Message Дмитрий Иванов 2023-08-03 00:48:14 Schema diff tools excludes the SET directive from the function header
Previous Message David G. Johnston 2023-08-02 16:42:20 Re: Assign User Defined DataType To Columns

Browse pgsql-admin by date

  From Date Subject
Next Message Chris Hoover 2023-08-02 20:17:57 Anyway to index array with other columns
Previous Message David G. Johnston 2023-08-02 16:42:20 Re: Assign User Defined DataType To Columns