Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6ec0753

Browse files
committed
Ignore RECHECK in CREATE OPERATOR CLASS, just throwing a NOTICE, instead of
throwing an error as 8.4 had been doing. The error interfered with portingold database definitions (particularly for pg_migrator) without really buyingany safety. Per bug #4817 and subsequent discussion.
1 parent9873db6 commit6ec0753

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

‎src/backend/parser/gram.y

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.663 2009/04/28 09:09:41 heikki Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.664 2009/05/27 20:42:29 tgl Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -3639,9 +3639,14 @@ opt_opfamily:FAMILY any_name{ $$ = $2; }
36393639

36403640
opt_recheck:RECHECK
36413641
{
3642-
ereport(ERROR,
3642+
/*
3643+
* RECHECK no longer does anything in opclass definitions,
3644+
* but we still accept it to ease porting of old database
3645+
* dumps.
3646+
*/
3647+
ereport(NOTICE,
36433648
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
3644-
errmsg("RECHECK is no longersupported"),
3649+
errmsg("RECHECK is no longerrequired"),
36453650
errhint("Update your data type."),
36463651
scanner_errposition(@1)));
36473652
$$ =TRUE;

‎src/bin/pg_dump/pg_dump.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.537 2009/05/26 17:36:05 tgl Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.538 2009/05/27 20:42:29 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -8159,8 +8159,10 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo)
81598159
* pg_depend entries.
81608160
*
81618161
* XXX RECHECK is gone as of 8.4, but we'll still print it if dumping
8162-
* an older server's table in which it is used. Would it be better
8163-
* to silently ignore it?
8162+
* an older server's opclass in which it is used. This is to avoid
8163+
* hard-to-detect breakage if a newer pg_dump is used to dump from
8164+
* an older server and then reload into that old version. This can
8165+
* go away once 8.3 is so old as to not be of interest to anyone.
81648166
*/
81658167
appendPQExpBuffer(query,"SELECT amopstrategy, false AS amopreqcheck, "
81668168
"amopopr::pg_catalog.regoperator "
@@ -8370,8 +8372,10 @@ dumpOpfamily(Archive *fout, OpfamilyInfo *opfinfo)
83708372
{
83718373
/*
83728374
* XXX RECHECK is gone as of 8.4, but we'll still print it if dumping
8373-
* an older server's table in which it is used. Would it be better
8374-
* to silently ignore it?
8375+
* an older server's opclass in which it is used. This is to avoid
8376+
* hard-to-detect breakage if a newer pg_dump is used to dump from
8377+
* an older server and then reload into that old version. This can
8378+
* go away once 8.3 is so old as to not be of interest to anyone.
83758379
*/
83768380
appendPQExpBuffer(query,"SELECT amopstrategy, false AS amopreqcheck, "
83778381
"amopopr::pg_catalog.regoperator "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp