mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Allow reloption names to have qualifiers, initially supporting a TOAST
qualifier, and add support for this in pg_dump. This allows TOAST tables to have user-defined fillfactor, and will also enable us to move the autovacuum parameters to reloptions without taking away the possibility of setting values for TOAST tables.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.421 2009/01/22 20:16:03 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.422 2009/02/02 19:31:39 alvherre Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2125,6 +2125,18 @@ _copyOptionDefElem(OptionDefElem *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static ReloptElem *
|
||||
_copyReloptElem(ReloptElem *from)
|
||||
{
|
||||
ReloptElem *newnode = makeNode(ReloptElem);
|
||||
|
||||
COPY_STRING_FIELD(optname);
|
||||
COPY_STRING_FIELD(nmspc);
|
||||
COPY_NODE_FIELD(arg);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static LockingClause *
|
||||
_copyLockingClause(LockingClause *from)
|
||||
{
|
||||
@ -4079,6 +4091,9 @@ copyObject(void *from)
|
||||
case T_OptionDefElem:
|
||||
retval = _copyOptionDefElem(from);
|
||||
break;
|
||||
case T_ReloptElem:
|
||||
retval = _copyReloptElem(from);
|
||||
break;
|
||||
case T_LockingClause:
|
||||
retval = _copyLockingClause(from);
|
||||
break;
|
||||
|
@ -22,7 +22,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.346 2009/01/22 20:16:03 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.347 2009/02/02 19:31:39 alvherre Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2098,6 +2098,16 @@ _equalOptionDefElem(OptionDefElem *a, OptionDefElem *b)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalReloptElem(ReloptElem *a, ReloptElem *b)
|
||||
{
|
||||
COMPARE_STRING_FIELD(nmspc);
|
||||
COMPARE_STRING_FIELD(optname);
|
||||
COMPARE_NODE_FIELD(arg);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalLockingClause(LockingClause *a, LockingClause *b)
|
||||
{
|
||||
@ -2855,6 +2865,9 @@ equal(void *a, void *b)
|
||||
case T_OptionDefElem:
|
||||
retval = _equalOptionDefElem(a, b);
|
||||
break;
|
||||
case T_ReloptElem:
|
||||
retval = _equalReloptElem(a, b);
|
||||
break;
|
||||
case T_LockingClause:
|
||||
retval = _equalLockingClause(a, b);
|
||||
break;
|
||||
|
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/makefuncs.c,v 1.62 2009/01/01 17:23:43 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/makefuncs.c,v 1.63 2009/02/02 19:31:39 alvherre Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -374,3 +374,14 @@ makeOptionDefElem(int op, DefElem *def)
|
||||
res->def = def;
|
||||
return res;
|
||||
}
|
||||
|
||||
ReloptElem *
|
||||
makeReloptElem(char *name, char *nmspc, Node *arg)
|
||||
{
|
||||
ReloptElem *res = makeNode(ReloptElem);
|
||||
|
||||
res->optname = name;
|
||||
res->nmspc = nmspc;
|
||||
res->arg = arg;
|
||||
return res;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.350 2009/01/22 20:16:04 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.351 2009/02/02 19:31:39 alvherre Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Every node type that can appear in stored rules' parsetrees *must*
|
||||
@ -1804,6 +1804,16 @@ _outDefElem(StringInfo str, DefElem *node)
|
||||
WRITE_NODE_FIELD(arg);
|
||||
}
|
||||
|
||||
static void
|
||||
_outReloptElem(StringInfo str, ReloptElem *node)
|
||||
{
|
||||
WRITE_NODE_TYPE("RELOPTELEM");
|
||||
|
||||
WRITE_STRING_FIELD(nmspc);
|
||||
WRITE_STRING_FIELD(optname);
|
||||
WRITE_NODE_FIELD(arg);
|
||||
}
|
||||
|
||||
static void
|
||||
_outLockingClause(StringInfo str, LockingClause *node)
|
||||
{
|
||||
@ -2770,6 +2780,9 @@ _outNode(StringInfo str, void *obj)
|
||||
case T_DefElem:
|
||||
_outDefElem(str, obj);
|
||||
break;
|
||||
case T_ReloptElem:
|
||||
_outReloptElem(str, obj);
|
||||
break;
|
||||
case T_LockingClause:
|
||||
_outLockingClause(str, obj);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user