Commit 05e83968 authored by Tom Lane's avatar Tom Lane

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 were
defined independently of, and indeed conflicting with, the main tag-number
list.  While this accidentally failed to fail so far, it would certainly
lead to trouble as soon as anyone wanted to, say, apply copyObject to these
node types.  Clang was already complaining about the use of makeNode on
these tags, and I think quite rightly so.  Fix by pushing these node
definitions into the mainstream, including putting replnodes.h where it
belongs.
parent ffcf5a6c
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
#include "postgres.h" #include "postgres.h"
#include "nodes/makefuncs.h" #include "nodes/makefuncs.h"
#include "nodes/parsenodes.h" #include "nodes/replnodes.h"
#include "replication/replnodes.h"
#include "replication/walsender.h" #include "replication/walsender.h"
/* Result of the parsing is returned here */ /* Result of the parsing is returned here */
Node *replication_parse_result; Node *replication_parse_result;
......
...@@ -37,16 +37,16 @@ ...@@ -37,16 +37,16 @@
#include <signal.h> #include <signal.h>
#include <unistd.h> #include <unistd.h>
#include "funcapi.h"
#include "access/xlog_internal.h"
#include "access/transam.h" #include "access/transam.h"
#include "access/xlog_internal.h"
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "funcapi.h"
#include "libpq/libpq.h" #include "libpq/libpq.h"
#include "libpq/pqformat.h" #include "libpq/pqformat.h"
#include "libpq/pqsignal.h" #include "libpq/pqsignal.h"
#include "miscadmin.h" #include "miscadmin.h"
#include "nodes/replnodes.h"
#include "replication/basebackup.h" #include "replication/basebackup.h"
#include "replication/replnodes.h"
#include "replication/walprotocol.h" #include "replication/walprotocol.h"
#include "replication/walreceiver.h" #include "replication/walreceiver.h"
#include "replication/walsender.h" #include "replication/walsender.h"
......
...@@ -402,6 +402,13 @@ typedef enum NodeTag ...@@ -402,6 +402,13 @@ typedef enum NodeTag
T_WithClause, T_WithClause,
T_CommonTableExpr, T_CommonTableExpr,
/*
* TAGS FOR REPLICATION GRAMMAR PARSE NODES (replnodes.h)
*/
T_IdentifySystemCmd,
T_BaseBackupCmd,
T_StartReplicationCmd,
/* /*
* TAGS FOR RANDOM OTHER STUFF * TAGS FOR RANDOM OTHER STUFF
* *
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* src/include/replication/replnodes.h * src/include/nodes/replnodes.h
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -15,18 +15,8 @@ ...@@ -15,18 +15,8 @@
#define REPLNODES_H #define REPLNODES_H
#include "access/xlogdefs.h" #include "access/xlogdefs.h"
#include "nodes/primnodes.h" #include "nodes/pg_list.h"
#include "nodes/value.h"
/*
* NodeTags for replication parser
*/
typedef enum ReplNodeTag
{
T_IdentifySystemCmd = 10,
T_BaseBackupCmd,
T_StartReplicationCmd
} ReplNodeTag;
/* ---------------------- /* ----------------------
* IDENTIFY_SYSTEM command * IDENTIFY_SYSTEM command
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
* *
* Portions Copyright (c) 2010-2011, PostgreSQL Global Development Group * Portions Copyright (c) 2010-2011, PostgreSQL Global Development Group
* *
* src/include/replication/walsender.h * src/include/replication/basebackup.h
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#ifndef _BASEBACKUP_H #ifndef _BASEBACKUP_H
#define _BASEBACKUP_H #define _BASEBACKUP_H
#include "replication/replnodes.h" #include "nodes/replnodes.h"
extern void SendBaseBackup(BaseBackupCmd *cmd); extern void SendBaseBackup(BaseBackupCmd *cmd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment