public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Phani Prathyush Somayajula <[email protected]>
Cc: Pgsql-admin <[email protected]>
Cc: [email protected] <[email protected]>
Cc: pgAdmin Support <[email protected]>
Subject: Re: Assign User Defined DataType To Columns
Date: Wed, 2 Aug 2023 09:42:20 -0700
Message-ID: <CAKFQuwYXZF7dnmOk2_EPx0aYx-ND8-iJeQG=ioyu24mfRiK-mg@mail.gmail.com> (raw)
In-Reply-To: <VI1PR10MB7671CCB681768701B55BB8298D0BA@VI1PR10MB7671.EURPRD10.PROD.OUTLOOK.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>
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], [email protected]
Subject: Re: Assign User Defined DataType To Columns
In-Reply-To: <CAKFQuwYXZF7dnmOk2_EPx0aYx-ND8-iJeQG=ioyu24mfRiK-mg@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