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

Commite97bc2f

Browse files
committed
Merge branch 'REL9_5_STABLE' into PGPRO9_5
Fix conflicts:src/backend/optimizer/util/plancat.c
2 parents2dca94c +e504d91 commite97bc2f

File tree

18 files changed

+167
-64
lines changed

18 files changed

+167
-64
lines changed

‎contrib/btree_gist/expected/not_equal.out‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ INSERT INTO test_ne SELECT '2009-01-01', 10.7 FROM generate_series(1,1000);
99
INSERT INTO test_ne VALUES('2007-02-03', -91.3);
1010
INSERT INTO test_ne VALUES('2011-09-01', 43.7);
1111
INSERT INTO test_ne SELECT '2009-01-01', 10.7 FROM generate_series(1,1000);
12+
SET enable_indexscan to false;
1213
EXPLAIN (COSTS OFF) SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7;
1314
QUERY PLAN
1415
------------------------------------------------------------------------------------------------------
@@ -25,6 +26,7 @@ SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7;
2526
Thu Sep 01 00:00:00 2011 | 43.7
2627
(2 rows)
2728

29+
RESET enable_indexscan;
2830
-- test search for "not equals" using an exclusion constraint
2931
CREATE TABLE zoo (
3032
cage INTEGER,

‎contrib/btree_gist/sql/not_equal.sql‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ INSERT INTO test_ne VALUES('2007-02-03', -91.3);
1414
INSERT INTO test_neVALUES('2011-09-01',43.7);
1515
INSERT INTO test_neSELECT'2009-01-01',10.7FROM generate_series(1,1000);
1616

17+
SET enable_indexscan to false;
18+
1719
EXPLAIN (COSTS OFF)SELECT*FROM test_neWHERE a<>'2009-01-01'AND b<>10.7;
1820

1921
SELECT*FROM test_neWHERE a<>'2009-01-01'AND b<>10.7;
2022

23+
RESET enable_indexscan;
24+
2125
-- test search for "not equals" using an exclusion constraint
2226

2327
CREATETABLEzoo (

‎doc/src/sgml/gin.sgml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@
539539
<function>extractQuery</> to pass additional data to the
540540
<function>consistent</> and <function>comparePartial</> methods.
541541
To use it, <function>extractQuery</> must allocate
542-
an array of <literal>*nkeys</>Pointers and store its address at
542+
an array of <literal>*nkeys</>pointers and store its address at
543543
<literal>*extra_data</>, then store whatever it wants to into the
544544
individual pointers. The variable is initialized to <symbol>NULL</symbol> before
545545
call, so this argument can simply be ignored by operator classes that

‎doc/src/sgml/ref/pg_dump.sgml‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -817,9 +817,16 @@ doc/src/sgml/ref/pg_dump.sgml
817817
<term><option>--quote-all-identifiers</></term>
818818
<listitem>
819819
<para>
820-
Force quoting of all identifiers. This may be useful when dumping a
821-
database for migration to a future version that may have introduced
822-
additional keywords.
820+
Force quoting of all identifiers. This option is recommended when
821+
dumping a database from a server whose <productname>PostgreSQL</>
822+
major version is different from <application>pg_dump</>'s, or when
823+
the output is intended to be loaded into a server of a different
824+
major version. By default, <application>pg_dump</> quotes only
825+
identifiers that are reserved words in its own major version.
826+
This sometimes results in compatibility issues when dealing with
827+
servers of other versions that may have slightly different sets
828+
of reserved words. Using <option>--quote-all-identifiers</> prevents
829+
such issues, at the price of a harder-to-read dump script.
823830
</para>
824831
</listitem>
825832
</varlistentry>
@@ -1150,6 +1157,9 @@ CREATE DATABASE foo WITH TEMPLATE template0;
11501157
dump was taken from a server of that version. Loading a dump file
11511158
into an older server may require manual editing of the dump file
11521159
to remove syntax not understood by the older server.
1160+
Use of the <option>--quote-all-identifiers</option> option is recommended
1161+
in cross-version cases, as it can prevent problems arising from varying
1162+
reserved-word lists in different <productname>PostgreSQL</> versions.
11531163
</para>
11541164
</refsect1>
11551165

‎doc/src/sgml/ref/pg_dumpall.sgml‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,16 @@ doc/src/sgml/ref/pg_dumpall.sgml
368368
<term><option>--quote-all-identifiers</></term>
369369
<listitem>
370370
<para>
371-
Force quoting of all identifiers. This may be useful when dumping a
372-
database for migration to a future version that may have introduced
373-
additional keywords.
371+
Force quoting of all identifiers. This option is recommended when
372+
dumping a database from a server whose <productname>PostgreSQL</>
373+
major version is different from <application>pg_dumpall</>'s, or when
374+
the output is intended to be loaded into a server of a different
375+
major version. By default, <application>pg_dumpall</> quotes only
376+
identifiers that are reserved words in its own major version.
377+
This sometimes results in compatibility issues when dealing with
378+
servers of other versions that may have slightly different sets
379+
of reserved words. Using <option>--quote-all-identifiers</> prevents
380+
such issues, at the price of a harder-to-read dump script.
374381
</para>
375382
</listitem>
376383
</varlistentry>

‎src/backend/access/heap/heapam.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6752,8 +6752,8 @@ heap_tuple_needs_freeze(HeapTupleHeader tuple, TransactionId cutoff_xid,
67526752

67536753
/*
67546754
* The considerations for multixacts are complicated; look at
6755-
*heap_freeze_tuple for justifications. This routine had better be in
6756-
* sync with that one!
6755+
*heap_prepare_freeze_tuple for justifications. This routine had better
6756+
*be insync with that one!
67576757
*/
67586758
if (tuple->t_infomask&HEAP_XMAX_IS_MULTI)
67596759
{
@@ -7611,8 +7611,8 @@ heap_xlog_visible(XLogReaderState *record)
76117611
PageInit(vmpage,BLCKSZ,0);
76127612

76137613
/*
7614-
*XLogReplayBufferExtended locked the buffer. But visibilitymap_set
7615-
* will handle locking itself.
7614+
*XLogReadBufferForRedoExtended locked the buffer. But
7615+
*visibilitymap_setwill handle locking itself.
76167616
*/
76177617
LockBuffer(vmbuffer,BUFFER_LOCK_UNLOCK);
76187618

‎src/backend/access/transam/xlogutils.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,10 @@ XLogReadBufferForRedoExtended(XLogReaderState *record,
422422
* to imply that the page should be dropped or truncated later.
423423
*
424424
* NB: A redo function should normally not call this directly. To get a page
425-
* to modify, use XLogReplayBuffer instead. It is important that all pages
426-
* modified by a WAL record are registered in the WAL records, or they will be
427-
* invisible to tools that that need to know which pages are modified.
425+
* to modify, use XLogReadBufferForRedoExtended instead. It is important that
426+
* all pages modified by a WAL record are registered in the WAL records, or
427+
* they will be invisible to tools that that need to know which pages are
428+
* modified.
428429
*/
429430
Buffer
430431
XLogReadBufferExtended(RelFileNodernode,ForkNumberforknum,

‎src/backend/catalog/dependency.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,6 +1777,15 @@ find_expr_references_walker(Node *node,
17771777
add_object_address(OCLASS_TYPE,cd->resulttype,0,
17781778
context->addrs);
17791779
}
1780+
elseif (IsA(node,OnConflictExpr))
1781+
{
1782+
OnConflictExpr*onconflict= (OnConflictExpr*)node;
1783+
1784+
if (OidIsValid(onconflict->constraint))
1785+
add_object_address(OCLASS_CONSTRAINT,onconflict->constraint,0,
1786+
context->addrs);
1787+
/* fall through to examine arguments */
1788+
}
17801789
elseif (IsA(node,SortGroupClause))
17811790
{
17821791
SortGroupClause*sgc= (SortGroupClause*)node;

‎src/backend/executor/execTuples.c‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,33 +1325,32 @@ do_tup_output(TupOutputState *tstate, Datum *values, bool *isnull)
13251325
* Should only be used with a single-TEXT-attribute tupdesc.
13261326
*/
13271327
void
1328-
do_text_output_multiline(TupOutputState*tstate,char*text)
1328+
do_text_output_multiline(TupOutputState*tstate,constchar*txt)
13291329
{
13301330
Datumvalues[1];
13311331
boolisnull[1]= {false};
13321332

1333-
while (*text)
1333+
while (*txt)
13341334
{
1335-
char*eol;
1335+
constchar*eol;
13361336
intlen;
13371337

1338-
eol=strchr(text,'\n');
1338+
eol=strchr(txt,'\n');
13391339
if (eol)
13401340
{
1341-
len=eol-text;
1342-
1341+
len=eol-txt;
13431342
eol++;
13441343
}
13451344
else
13461345
{
1347-
len=strlen(text);
1348-
eol+=len;
1346+
len=strlen(txt);
1347+
eol=txt+len;
13491348
}
13501349

1351-
values[0]=PointerGetDatum(cstring_to_text_with_len(text,len));
1350+
values[0]=PointerGetDatum(cstring_to_text_with_len(txt,len));
13521351
do_tup_output(tstate,values,isnull);
13531352
pfree(DatumGetPointer(values[0]));
1354-
text=eol;
1353+
txt=eol;
13551354
}
13561355
}
13571356

‎src/backend/nodes/nodeFuncs.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3365,6 +3365,15 @@ raw_expression_tree_walker(Node *node,
33653365
/* for now, constraints are ignored */
33663366
}
33673367
break;
3368+
caseT_IndexElem:
3369+
{
3370+
IndexElem*indelem= (IndexElem*)node;
3371+
3372+
if (walker(indelem->expr,context))
3373+
return true;
3374+
/* collation and opclass names are deemed uninteresting */
3375+
}
3376+
break;
33683377
caseT_GroupingSet:
33693378
returnwalker(((GroupingSet*)node)->content,context);
33703379
caseT_LockingClause:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp