Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 039dfbf

Browse files
committed
Reduce the need for frontend programs to include "postgres.h" by refactoring
inclusions in src/include/catalog/*.h files. The main idea here is to push function declarations for src/backend/catalog/*.c files into separate headers, rather than sticking them into the corresponding catalog definition file as has been done in the past. This commit only carries out that idea fully for pg_proc, pg_type and pg_conversion, but that's enough for the moment --- if pg_list.h ever becomes unsafe for frontend code to include, we'll need to work a bit more. Zdenek Kotala
1 parent 73b0300 commit 039dfbf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+357
-447
lines changed

src/backend/catalog/dependency.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.70 2008/03/26 21:10:37 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.71 2008/03/27 03:57:33 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -29,6 +29,7 @@
2929
#include "catalog/pg_cast.h"
3030
#include "catalog/pg_constraint.h"
3131
#include "catalog/pg_conversion.h"
32+
#include "catalog/pg_conversion_fn.h"
3233
#include "catalog/pg_database.h"
3334
#include "catalog/pg_depend.h"
3435
#include "catalog/pg_language.h"

src/backend/catalog/heap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.331 2008/03/26 21:10:37 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.332 2008/03/27 03:57:33 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -45,6 +45,7 @@
4545
#include "catalog/pg_statistic.h"
4646
#include "catalog/pg_tablespace.h"
4747
#include "catalog/pg_type.h"
48+
#include "catalog/pg_type_fn.h"
4849
#include "commands/tablecmds.h"
4950
#include "commands/typecmds.h"
5051
#include "miscadmin.h"

src/backend/catalog/namespace.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
1515
* IDENTIFICATION
16-
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.104 2008/01/01 19:45:48 momjian Exp $
16+
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.105 2008/03/27 03:57:33 tgl Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -24,6 +24,7 @@
2424
#include "catalog/namespace.h"
2525
#include "catalog/pg_authid.h"
2626
#include "catalog/pg_conversion.h"
27+
#include "catalog/pg_conversion_fn.h"
2728
#include "catalog/pg_namespace.h"
2829
#include "catalog/pg_opclass.h"
2930
#include "catalog/pg_operator.h"

src/backend/catalog/pg_aggregate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/pg_aggregate.c,v 1.91 2008/03/25 22:42:42 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/pg_aggregate.c,v 1.92 2008/03/27 03:57:33 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -21,6 +21,7 @@
2121
#include "catalog/pg_language.h"
2222
#include "catalog/pg_operator.h"
2323
#include "catalog/pg_proc.h"
24+
#include "catalog/pg_proc_fn.h"
2425
#include "catalog/pg_type.h"
2526
#include "miscadmin.h"
2627
#include "parser/parse_coerce.h"

src/backend/catalog/pg_conversion.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.41 2008/03/26 21:10:37 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.42 2008/03/27 03:57:33 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -19,6 +19,7 @@
1919
#include "catalog/indexing.h"
2020
#include "catalog/namespace.h"
2121
#include "catalog/pg_conversion.h"
22+
#include "catalog/pg_conversion_fn.h"
2223
#include "catalog/pg_namespace.h"
2324
#include "catalog/pg_proc.h"
2425
#include "mb/pg_wchar.h"

src/backend/catalog/pg_proc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.150 2008/03/25 22:42:42 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.151 2008/03/27 03:57:33 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -21,6 +21,7 @@
2121
#include "catalog/pg_language.h"
2222
#include "catalog/pg_namespace.h"
2323
#include "catalog/pg_proc.h"
24+
#include "catalog/pg_proc_fn.h"
2425
#include "catalog/pg_type.h"
2526
#include "executor/functions.h"
2627
#include "funcapi.h"

src/backend/catalog/pg_type.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/pg_type.c,v 1.117 2008/03/25 22:42:42 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/pg_type.c,v 1.118 2008/03/27 03:57:33 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -21,6 +21,7 @@
2121
#include "catalog/pg_namespace.h"
2222
#include "catalog/pg_proc.h"
2323
#include "catalog/pg_type.h"
24+
#include "catalog/pg_type_fn.h"
2425
#include "commands/typecmds.h"
2526
#include "miscadmin.h"
2627
#include "parser/scansup.h"

src/backend/commands/conversioncmds.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/commands/conversioncmds.c,v 1.32 2008/01/01 19:45:48 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/commands/conversioncmds.c,v 1.33 2008/03/27 03:57:33 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -18,6 +18,7 @@
1818
#include "catalog/dependency.h"
1919
#include "catalog/indexing.h"
2020
#include "catalog/pg_conversion.h"
21+
#include "catalog/pg_conversion_fn.h"
2122
#include "catalog/pg_type.h"
2223
#include "commands/conversioncmds.h"
2324
#include "mb/pg_wchar.h"

src/backend/commands/functioncmds.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.90 2008/03/26 21:10:37 alvherre Exp $
13+
* $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.91 2008/03/27 03:57:33 tgl Exp $
1414
*
1515
* DESCRIPTION
1616
* These routines take the parse tree and pick out the
@@ -41,7 +41,9 @@
4141
#include "catalog/pg_language.h"
4242
#include "catalog/pg_namespace.h"
4343
#include "catalog/pg_proc.h"
44+
#include "catalog/pg_proc_fn.h"
4445
#include "catalog/pg_type.h"
46+
#include "catalog/pg_type_fn.h"
4547
#include "commands/defrem.h"
4648
#include "commands/proclang.h"
4749
#include "miscadmin.h"

src/backend/commands/proclang.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/commands/proclang.c,v 1.76 2008/03/26 21:10:37 alvherre Exp $
10+
* $PostgreSQL: pgsql/src/backend/commands/proclang.c,v 1.77 2008/03/27 03:57:33 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -22,6 +22,7 @@
2222
#include "catalog/pg_namespace.h"
2323
#include "catalog/pg_pltemplate.h"
2424
#include "catalog/pg_proc.h"
25+
#include "catalog/pg_proc_fn.h"
2526
#include "catalog/pg_type.h"
2627
#include "commands/dbcommands.h"
2728
#include "commands/defrem.h"

0 commit comments

Comments
 (0)