public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Phani Prathyush Somayajula <[email protected]>
Cc: Pgsql-admin <[email protected]>
Subject: Re: Assign User Defined DataType To Columns
Date: Wed, 2 Aug 2023 09:50:41 -0700
Message-ID: <CAKFQuwYa6PDMPb8DjL+zQnEJYaOz-3mYa8uKbBpgO6ttsmMWAg@mail.gmail.com> (raw)
In-Reply-To: <CAKFQuwYXZF7dnmOk2_EPx0aYx-ND8-iJeQG=ioyu24mfRiK-mg@mail.gmail.com>
References: <CAGA3vBt726ha1P91DrSOF8oc57X27tLO8o9Wi9oDN5L3qqRi7Q@mail.gmail.com>
	<[email protected]>
	<CAGA3vBspwtKvaFBXT4c78cdW+mgfXJ68MSDL3TiVdMxpZPp_VA@mail.gmail.com>
	<[email protected]>
	<CAGA3vBvOOmrhpOJc3gjMcQS_TDfGR7OH_vaodLUQoJxYO8wZSQ@mail.gmail.com>
	<VI1PR10MB7671CCB681768701B55BB8298D0BA@VI1PR10MB7671.EURPRD10.PROD.OUTLOOK.COM>
	<CAKFQuwYXZF7dnmOk2_EPx0aYx-ND8-iJeQG=ioyu24mfRiK-mg@mail.gmail.com>

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 <[email protected]>
wrote:

> On Wed, Aug 2, 2023 at 9:24 AM Phani Prathyush Somayajula <
> [email protected]> 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.
>
>


view thread (15+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Assign User Defined DataType To Columns
  In-Reply-To: <CAKFQuwYa6PDMPb8DjL+zQnEJYaOz-3mYa8uKbBpgO6ttsmMWAg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox