Hi, AS is optional in CREATE DOMAIN, but psql completion currently works only when it is present:
postgres=# CREATE DOMAIN d AS enu<Tab> -- completes enum1 postgres=# CREATE DOMAIN d enu<Tab> -- no completion The attached patch offers data types both with and without AS. It also offers the following clauses after the base type in either form: COLLATE DEFAULT CONSTRAINT NOT NULL NULL CHECK ( Collation-name completion is corrected as well: postgres=# CREATE DOMAIN d text COLLATE col<Tab> postgres=# CREATE DOMAIN d text COLLATE coll1 The change follows the existing single-word base-type matching and does not add completion inside DEFAULT or CHECK expressions. Tests for both forms are included. Regards, Taiki Koshino Taiki Koshino<[email protected]> SRA OSS K.K. TEL: 03-5979-2701 FAX: 03-5979-2702 URL: https://www.sraoss.co.jp/
v1-0001-Improve-tab-completion-for-CREATE-DOMAIN-without-.patch
Description: v1-0001-Improve-tab-completion-for-CREATE-DOMAIN-without-.patch
