Re: Assign User Defined DataType To Columns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> wrote:
On Wed, Aug 2, 2023 at 9:24 AM Phani Prathyush Somayajula <phani.somayajula@xxxxxxxxxxxxxxxxx> 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.


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux