diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-06-15 19:05:11 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-06-15 19:06:21 -0400 |
commit | e1ccaff6eea1b48f4b9b28cabaf0f990119b0d19 (patch) | |
tree | a0a27055b145ea815d4658120bf120d8dbe91414 /src/interfaces/ecpg/preproc | |
parent | e3df3572f66aa099d337f013dceef7d519ef8398 (diff) |
Rework parsing of ConstraintAttributeSpec to improve NOT VALID handling.
The initial commit of the ALTER TABLE ADD FOREIGN KEY NOT VALID feature
failed to support labeling such constraints as deferrable. The best fix
for this seems to be to fold NOT VALID into ConstraintAttributeSpec.
That's a bit more general than the documented syntax, but it allows
better-targeted syntax error messages.
In addition, do some mostly-but-not-entirely-cosmetic code review for
the whole NOT VALID patch.
Diffstat (limited to 'src/interfaces/ecpg/preproc')
-rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.addons | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.addons b/src/interfaces/ecpg/preproc/ecpg.addons index a689dbc70e6..f6f9ff4313d 100644 --- a/src/interfaces/ecpg/preproc/ecpg.addons +++ b/src/interfaces/ecpg/preproc/ecpg.addons @@ -207,12 +207,6 @@ ECPG: CopyStmtCOPYopt_binaryqualified_nameopt_column_listopt_oidscopy_fromcopy_f ECPG: CopyStmtCOPYselect_with_parensTOcopy_file_nameopt_withcopy_options addon if (strcmp($4, "stdin") == 0) mmerror(PARSE_ERROR, ET_ERROR, "COPY TO STDIN is not possible"); -ECPG: ConstraintAttributeSpecConstraintDeferrabilitySpecConstraintTimeSpec addon - if (strcmp($1, "deferrable") != 0 && strcmp($2, "initially deferrable") == 0 ) - mmerror(PARSE_ERROR, ET_ERROR, "constraint declared INITIALLY DEFERRED must be DEFERRABLE"); -ECPG: ConstraintAttributeSpecConstraintTimeSpecConstraintDeferrabilitySpec addon - if (strcmp($2, "deferrable") != 0 && strcmp($1, "initially deferrable") == 0 ) - mmerror(PARSE_ERROR, ET_ERROR, "constraint declared INITIALLY DEFERRED must be DEFERRABLE"); ECPG: var_valueNumericOnly addon if ($1[0] == '$') { |