[PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement

Started by zengmanabout 1 year ago1 messageshackers
Jump to latest
#1zengman
zengman@halodbtech.com

Hello everyone,

I have tested the v4 patch and observed that the following scenario requires support. Accordingly, I have prepared version v5: v5-0001 is fully consistent with the v4 patch, and v5-0002 restricts input to domains exclusively, with an additional simple test case attached.

```sql
postgres=# create table test_table(a int);
CREATE TABLE
postgres=# SELECT pg_get_domain_ddl('test_table');
ERROR: cache lookup failed for type 0
```

--
Regrads,
Man Zeng

Attachments:

t52707_1
v5-0001-Add-pg_get_domain_ddl-function-to-reconstruct-CRE.patchapplication/octet-stream; charset=ISO-8859-1; name=v5-0001-Add-pg_get_domain_ddl-function-to-reconstruct-CRE.patchDownload+751-2
v5-0002-Add-pg_get_domain_ddl-function-to-reconstruct-CRE.patchapplication/octet-stream; charset=ISO-8859-1; name=v5-0002-Add-pg_get_domain_ddl-function-to-reconstruct-CRE.patchDownload+26-1