mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Refer to the default foreign key match style as MATCH SIMPLE internally.
Previously we followed the SQL92 wording, "MATCH <unspecified>", but since SQL99 there's been a less awkward way to refer to the default style. In addition to the code changes, pg_constraint.confmatchtype now stores this match style as 's' (SIMPLE) rather than 'u' (UNSPECIFIED). This doesn't affect pg_dump or psql because they use pg_get_constraintdef() to reconstruct foreign key definitions. But other client-side code might examine that column directly, so this change will have to be marked as an incompatibility in the 9.3 release notes.
This commit is contained in:
@@ -53,6 +53,6 @@
|
||||
*/
|
||||
|
||||
/* yyyymmddN */
|
||||
#define CATALOG_VERSION_NO 201206141
|
||||
#define CATALOG_VERSION_NO 201206171
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1514,7 +1514,7 @@ typedef enum ConstrType /* types of constraints */
|
||||
/* Foreign key matchtype codes */
|
||||
#define FKCONSTR_MATCH_FULL 'f'
|
||||
#define FKCONSTR_MATCH_PARTIAL 'p'
|
||||
#define FKCONSTR_MATCH_UNSPECIFIED 'u'
|
||||
#define FKCONSTR_MATCH_SIMPLE 's'
|
||||
|
||||
typedef struct Constraint
|
||||
{
|
||||
@@ -1550,7 +1550,7 @@ typedef struct Constraint
|
||||
RangeVar *pktable; /* Primary key table */
|
||||
List *fk_attrs; /* Attributes of foreign key */
|
||||
List *pk_attrs; /* Corresponding attrs in PK table */
|
||||
char fk_matchtype; /* FULL, PARTIAL, UNSPECIFIED */
|
||||
char fk_matchtype; /* FULL, PARTIAL, SIMPLE */
|
||||
char fk_upd_action; /* ON UPDATE action */
|
||||
char fk_del_action; /* ON DELETE action */
|
||||
List *old_conpfeqop; /* pg_constraint.conpfeqop of my former self */
|
||||
|
||||
Reference in New Issue
Block a user