Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
6cb74a67
Commit
6cb74a67
authored
10 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
revert "Throw error for ALTER TABLE RESET of an invalid option"
Reverts commits
73d78e11
and
b0488e5c
. Also reverts pg_upgrade changes.
parent
2209b392
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/pg_upgrade/dump.c
+1
-10
1 addition, 10 deletions
contrib/pg_upgrade/dump.c
src/backend/access/common/reloptions.c
+0
-26
0 additions, 26 deletions
src/backend/access/common/reloptions.c
with
1 addition
and
36 deletions
contrib/pg_upgrade/dump.c
+
1
−
10
View file @
6cb74a67
...
@@ -115,11 +115,6 @@ optionally_create_toast_tables(void)
...
@@ -115,11 +115,6 @@ optionally_create_toast_tables(void)
"c.relkind IN ('r', 'm') AND "
"c.relkind IN ('r', 'm') AND "
"c.reltoastrelid = 0"
);
"c.reltoastrelid = 0"
);
/* Suppress NOTICE output from non-existant constraints */
PQclear
(
executeQueryOrDie
(
conn
,
"SET client_min_messages = warning;"
));
PQclear
(
executeQueryOrDie
(
conn
,
"SET log_min_messages = warning;"
));
PQclear
(
executeQueryOrDie
(
conn
,
"SET log_min_error_statement = warning;"
));
ntups
=
PQntuples
(
res
);
ntups
=
PQntuples
(
res
);
i_nspname
=
PQfnumber
(
res
,
"nspname"
);
i_nspname
=
PQfnumber
(
res
,
"nspname"
);
i_relname
=
PQfnumber
(
res
,
"relname"
);
i_relname
=
PQfnumber
(
res
,
"relname"
);
...
@@ -130,17 +125,13 @@ optionally_create_toast_tables(void)
...
@@ -130,17 +125,13 @@ optionally_create_toast_tables(void)
OPTIONALLY_CREATE_TOAST_OID
));
OPTIONALLY_CREATE_TOAST_OID
));
/* dummy command that also triggers check for required TOAST table */
/* dummy command that also triggers check for required TOAST table */
PQclear
(
executeQueryOrDie
(
conn
,
"ALTER TABLE %s.%s
DROP CONSTRAINT IF EXISTS
binary_upgrade_dummy_
constraint
;"
,
PQclear
(
executeQueryOrDie
(
conn
,
"ALTER TABLE %s.%s
RESET (
binary_upgrade_dummy_
option)
;"
,
quote_identifier
(
PQgetvalue
(
res
,
rowno
,
i_nspname
)),
quote_identifier
(
PQgetvalue
(
res
,
rowno
,
i_nspname
)),
quote_identifier
(
PQgetvalue
(
res
,
rowno
,
i_relname
))));
quote_identifier
(
PQgetvalue
(
res
,
rowno
,
i_relname
))));
}
}
PQclear
(
res
);
PQclear
(
res
);
PQclear
(
executeQueryOrDie
(
conn
,
"RESET client_min_messages;"
));
PQclear
(
executeQueryOrDie
(
conn
,
"RESET log_min_messages;"
));
PQclear
(
executeQueryOrDie
(
conn
,
"RESET log_min_error_statement;"
));
PQfinish
(
conn
);
PQfinish
(
conn
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/backend/access/common/reloptions.c
+
0
−
26
View file @
6cb74a67
...
@@ -307,8 +307,6 @@ static void initialize_reloptions(void);
...
@@ -307,8 +307,6 @@ static void initialize_reloptions(void);
static
void
parse_one_reloption
(
relopt_value
*
option
,
char
*
text_str
,
static
void
parse_one_reloption
(
relopt_value
*
option
,
char
*
text_str
,
int
text_len
,
bool
validate
);
int
text_len
,
bool
validate
);
static
bool
is_valid_reloption
(
char
*
name
);
/*
/*
* initialize_reloptions
* initialize_reloptions
* initialization routine, must be called before parsing
* initialization routine, must be called before parsing
...
@@ -383,25 +381,6 @@ initialize_reloptions(void)
...
@@ -383,25 +381,6 @@ initialize_reloptions(void)
need_initialization
=
false
;
need_initialization
=
false
;
}
}
/*
* is_valid_reloption
* check if a reloption exists
*
*/
static
bool
is_valid_reloption
(
char
*
name
)
{
int
i
;
for
(
i
=
0
;
relOpts
[
i
];
i
++
)
{
if
(
pg_strcasecmp
(
relOpts
[
i
]
->
name
,
name
)
==
0
)
return
true
;
}
return
false
;
}
/*
/*
* add_reloption_kind
* add_reloption_kind
* Create a new relopt_kind value, to be used in custom reloptions by
* Create a new relopt_kind value, to be used in custom reloptions by
...
@@ -693,11 +672,6 @@ transformRelOptions(Datum oldOptions, List *defList, char *namspace,
...
@@ -693,11 +672,6 @@ transformRelOptions(Datum oldOptions, List *defList, char *namspace,
if
(
isReset
)
if
(
isReset
)
{
{
if
(
!
is_valid_reloption
(
def
->
defname
))
ereport
(
ERROR
,
(
errcode
(
ERRCODE_INVALID_PARAMETER_VALUE
),
errmsg
(
"unrecognized parameter
\"
%s
\"
"
,
def
->
defname
)));
if
(
def
->
arg
!=
NULL
)
if
(
def
->
arg
!=
NULL
)
ereport
(
ERROR
,
ereport
(
ERROR
,
(
errcode
(
ERRCODE_SYNTAX_ERROR
),
(
errcode
(
ERRCODE_SYNTAX_ERROR
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment