create type with %type or %rowtype - Mailing list pgsql-general

From Post Gresql
Subject create type with %type or %rowtype
Date
Msg-id 4fb49f43-6753-b692-9ca7-61052f63a929@taljaren.se
Whole thread Raw
Responses Re: create type with %type or %rowtype  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: create type with %type or %rowtype  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Hello.

It seems that I can not create a type with

create type my_type as my_table%rowtype;

or

create type my_type as my_table.my_column%type;

Correct? It seems to be a feature for plpgsql programing only, right?

But wouldn't that be a good thing to be able to do? Or would it cause 
too many problems?


Best regards





pgsql-general by date:

Previous
From: Olivier Gautherot
Date:
Subject: Re: autovacuum recommendations for Large tables
Next
From: Devrim Gündüz
Date:
Subject: Re: pg_upgrade from 12 to 13 failes with plpython2