Re: Assign User Defined DataType To Columns
От | David G. Johnston |
---|---|
Тема | Re: Assign User Defined DataType To Columns |
Дата | |
Msg-id | CAKFQuwYa6PDMPb8DjL+zQnEJYaOz-3mYa8uKbBpgO6ttsmMWAg@mail.gmail.com обсуждение исходный текст |
Ответ на | analyze foreign tables (richard coleman <rcoleman.ascentgl@gmail.com>) |
Список | 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.g.johnston@gmail.com> wrote:
On Wed, Aug 2, 2023 at 9:24 AM Phani Prathyush Somayajula <phani.somayajula@pragmaticplay.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.
В списке pgsql-admin по дате отправления: