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

Commit05e8396

Browse files
committed
Clean up ill-advised attempt to invent a private set of Node tags.
Somebody thought it'd be cute to invent a set of Node tag numbers that weredefined independently of, and indeed conflicting with, the main tag-numberlist. While this accidentally failed to fail so far, it would certainlylead to trouble as soon as anyone wanted to, say, apply copyObject to thesenode types. Clang was already complaining about the use of makeNode onthese tags, and I think quite rightly so. Fix by pushing these nodedefinitions into the mainstream, including putting replnodes.h where itbelongs.
1 parentffcf5a6 commit05e8396

File tree

5 files changed

+16
-19
lines changed

5 files changed

+16
-19
lines changed

‎src/backend/replication/repl_gram.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
#include"postgres.h"
1717

1818
#include"nodes/makefuncs.h"
19-
#include"nodes/parsenodes.h"
20-
#include"replication/replnodes.h"
19+
#include"nodes/replnodes.h"
2120
#include"replication/walsender.h"
2221

22+
2323
/* Result of the parsing is returned here*/
2424
Node *replication_parse_result;
2525

‎src/backend/replication/walsender.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@
3737
#include<signal.h>
3838
#include<unistd.h>
3939

40-
#include"funcapi.h"
41-
#include"access/xlog_internal.h"
4240
#include"access/transam.h"
41+
#include"access/xlog_internal.h"
4342
#include"catalog/pg_type.h"
43+
#include"funcapi.h"
4444
#include"libpq/libpq.h"
4545
#include"libpq/pqformat.h"
4646
#include"libpq/pqsignal.h"
4747
#include"miscadmin.h"
48+
#include"nodes/replnodes.h"
4849
#include"replication/basebackup.h"
49-
#include"replication/replnodes.h"
5050
#include"replication/walprotocol.h"
5151
#include"replication/walreceiver.h"
5252
#include"replication/walsender.h"

‎src/include/nodes/nodes.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,13 @@ typedef enum NodeTag
402402
T_WithClause,
403403
T_CommonTableExpr,
404404

405+
/*
406+
* TAGS FOR REPLICATION GRAMMAR PARSE NODES (replnodes.h)
407+
*/
408+
T_IdentifySystemCmd,
409+
T_BaseBackupCmd,
410+
T_StartReplicationCmd,
411+
405412
/*
406413
* TAGS FOR RANDOM OTHER STUFF
407414
*

‎src/include/replication/replnodes.hrenamed to‎src/include/nodes/replnodes.h

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,16 @@
77
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* src/include/replication/replnodes.h
10+
* src/include/nodes/replnodes.h
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#ifndefREPLNODES_H
1515
#defineREPLNODES_H
1616

1717
#include"access/xlogdefs.h"
18-
#include"nodes/primnodes.h"
19-
#include"nodes/value.h"
18+
#include"nodes/pg_list.h"
2019

21-
/*
22-
* NodeTags for replication parser
23-
*/
24-
typedefenumReplNodeTag
25-
{
26-
T_IdentifySystemCmd=10,
27-
T_BaseBackupCmd,
28-
T_StartReplicationCmd
29-
}ReplNodeTag;
3020

3121
/* ----------------------
3222
*IDENTIFY_SYSTEM command

‎src/include/replication/basebackup.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
*
66
* Portions Copyright (c) 2010-2011, PostgreSQL Global Development Group
77
*
8-
* src/include/replication/walsender.h
8+
* src/include/replication/basebackup.h
99
*
1010
*-------------------------------------------------------------------------
1111
*/
1212
#ifndef_BASEBACKUP_H
1313
#define_BASEBACKUP_H
1414

15-
#include"replication/replnodes.h"
15+
#include"nodes/replnodes.h"
1616

1717
externvoidSendBaseBackup(BaseBackupCmd*cmd);
1818

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp