| From: | Wesley Massuda <wesley(dot)massuda(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Proposal : composite type not null constraints |
| Date: | 2016-12-15 15:38:43 |
| Message-ID: | CABsWHhjt4YFDDeknzhGd4S03oSxmWYELOfi80gwQ4cPu-=YYUA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I would like to propose extending composite types with constraints.
Currently there is a preliminar patch for not null constraints.
===
Changes :
-Use the parser from create table to get the constraints
'OptTableElementList' instead of 'OptTableFuncElementList'.
- Add a new transformation transformCompositeTypeStmt similar to
transformCreateStmt to add constraint informations to stmt.
- Implement a recursive notnull check when a type is composite
==
Features enabled :
- Enable not null in parser for
create type tyname AS ( a type NOT NULL )
- Check for null in rowtypes
===
Wesley S. Massuda
| Attachment | Content-Type | Size |
|---|---|---|
| composite_type_not_null.patch | text/x-patch | 8.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2016-12-15 15:38:55 | Re: Missing newlines in error messages |
| Previous Message | Magnus Hagander | 2016-12-15 15:35:15 | Re: Missing newlines in error messages |