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

Commit2d774aa

Browse files
committed
Split out pg_operator.h function declarations to new file pg_operator_fn.h.
Commita2e35b5 added an #include of catalog/objectaddress.h topg_operator.h, making it impossible for client-side code to #includepg_operator.h. It's not entirely clear whether any client-side code needsto include pg_operator.h, but it seems prudent to assume that there is somesuch code somewhere. Therefore, split off the function definitions into anew file pg_operator_fn.h, similarly to what we've done for some othercatalog header files.Back-patch of part of commit0dab5ef.
1 parent69892d5 commit2d774aa

File tree

4 files changed

+34
-17
lines changed

4 files changed

+34
-17
lines changed

‎src/backend/catalog/pg_operator.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include"catalog/objectaccess.h"
2727
#include"catalog/pg_namespace.h"
2828
#include"catalog/pg_operator.h"
29+
#include"catalog/pg_operator_fn.h"
2930
#include"catalog/pg_proc.h"
3031
#include"catalog/pg_type.h"
3132
#include"miscadmin.h"

‎src/backend/commands/operatorcmds.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include"catalog/dependency.h"
4040
#include"catalog/indexing.h"
4141
#include"catalog/pg_operator.h"
42+
#include"catalog/pg_operator_fn.h"
4243
#include"catalog/pg_type.h"
4344
#include"commands/alter.h"
4445
#include"commands/defrem.h"

‎src/include/catalog/pg_operator.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#definePG_OPERATOR_H
2424

2525
#include"catalog/genbki.h"
26-
#include"catalog/objectaddress.h"
27-
#include"nodes/pg_list.h"
2826

2927
/* ----------------
3028
*pg_operator definition. cpp turns this into
@@ -1822,19 +1820,4 @@ DESCR("delete array element");
18221820
DATA(insertOID=3287 ("#-"PGNSPPGUIDbff38021009380200jsonb_delete_path-- ));
18231821
DESCR("delete path");
18241822

1825-
/*
1826-
* function prototypes
1827-
*/
1828-
externObjectAddressOperatorCreate(constchar*operatorName,
1829-
OidoperatorNamespace,
1830-
OidleftTypeId,
1831-
OidrightTypeId,
1832-
OidprocedureId,
1833-
List*commutatorName,
1834-
List*negatorName,
1835-
OidrestrictionId,
1836-
OidjoinId,
1837-
boolcanMerge,
1838-
boolcanHash);
1839-
18401823
#endif/* PG_OPERATOR_H */

‎src/include/catalog/pg_operator_fn.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* pg_operator_fn.h
4+
* prototypes for functions in catalog/pg_operator.c
5+
*
6+
*
7+
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
8+
* Portions Copyright (c) 1994, Regents of the University of California
9+
*
10+
* src/include/catalog/pg_operator_fn.h
11+
*
12+
*-------------------------------------------------------------------------
13+
*/
14+
#ifndefPG_OPERATOR_FN_H
15+
#definePG_OPERATOR_FN_H
16+
17+
#include"catalog/objectaddress.h"
18+
#include"nodes/pg_list.h"
19+
20+
externObjectAddressOperatorCreate(constchar*operatorName,
21+
OidoperatorNamespace,
22+
OidleftTypeId,
23+
OidrightTypeId,
24+
OidprocedureId,
25+
List*commutatorName,
26+
List*negatorName,
27+
OidrestrictionId,
28+
OidjoinId,
29+
boolcanMerge,
30+
boolcanHash);
31+
32+
#endif/* PG_OPERATOR_FN_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp