Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement
| От | Philip Alger | 
|---|---|
| Тема | Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement | 
| Дата | |
| Msg-id | CAPXBC8JxucG=m=Pnjb7-dLf5iqxcfA92-8UOEaNY1qDPH9dW3Q@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement (Quan Zongliang <quanzongliang@yeah.net>) | 
| Ответы | 
                	
            		Re: [PATCH] Add pg_get_type_ddl() to retrieve the CREATE TYPE statement
            		
            		 | 
		
| Список | pgsql-hackers | 
Hi Quan, 
This is part of a larger project as noted here:
> I am submitting a patch as part of the Retail DDL functions project
> described here [1].
> 1. https://www.postgresql.org/message-id/945db7c5-be75-45bf-b55b-
> cb1e56f2e3e9%40dunslane.net <https://www.postgresql.org/message-
> id/945db7c5-be75-45bf-b55b-cb1e56f2e3e9%40dunslane.net>
The idea here is to look up the created TYPE by its name and not the OID. The function that is close is pg_get_viewdef(text) [1], but that's deprecated.
 Also, see threads for: 
A. pg_get_trigger_ddl [2]
B. pg_get_tablespace_ddl [3]
C. pg_get_role_ddl [4]
D. pg_get_policy_ddl [5]
E. pg_get_domain_ddl [6]
Best, 
Phil Alger
В списке pgsql-hackers по дате отправления: