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

Commit4a5b781

Browse files
committed
Break parser functions into smaller files, group together.
1 parent3aff401 commit4a5b781

File tree

62 files changed

+5592
-5029
lines changed

Some content is hidden

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

62 files changed

+5592
-5029
lines changed

‎src/backend/access/common/tupdesc.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.28 1997/11/24 05:07:42 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.29 1997/11/25 21:58:35 momjian Exp $
1111
*
1212
* NOTES
1313
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -20,8 +20,9 @@
2020

2121
#include<postgres.h>
2222

23-
#include<parser/catalog_utils.h>
23+
#include<catalog/pg_type.h>
2424
#include<nodes/parsenodes.h>
25+
#include<parser/parse_type.h>
2526
#include<utils/builtins.h>
2627
#include<utils/fcache.h>
2728
#include<utils/syscache.h>
@@ -377,10 +378,10 @@ TupleDescInitEntry(TupleDesc desc,
377378
*/
378379
if (attisset)
379380
{
380-
Typet=type("oid");
381+
Typet=typeidType(OIDOID);
381382

382-
att->attlen=tlen(t);
383-
att->attbyval=tbyval(t);
383+
att->attlen=typeLen(t);
384+
att->attbyval=typeByVal(t);
384385
}
385386
else
386387
{
@@ -410,12 +411,12 @@ TupleDescMakeSelfReference(TupleDesc desc,
410411
char*relname)
411412
{
412413
AttributeTupleFormatt;
413-
Typet=type("oid");
414+
Typet=typeidType(OIDOID);
414415

415416
att=desc->attrs[attnum-1];
416417
att->atttypid=TypeShellMake(relname);
417-
att->attlen=tlen(t);
418-
att->attbyval=tbyval(t);
418+
att->attlen=typeLen(t);
419+
att->attbyval=typeByVal(t);
419420
att->attnelems=0;
420421
}
421422

‎src/backend/catalog/heap.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.33 1997/11/24 05:08:07 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.34 1997/11/25 21:58:40 momjian Exp $
1111
*
1212
* INTERFACE ROUTINES
1313
*heap_creatr()- Create an uncataloged heap relation
@@ -42,11 +42,12 @@
4242
#include<catalog/pg_attrdef.h>
4343
#include<catalog/pg_relcheck.h>
4444
#include<commands/trigger.h>
45+
#include<parser/parse_expr.h>
46+
#include<parser/parse_node.h>
47+
#include<parser/parse_type.h>
4548
#include<storage/bufmgr.h>
4649
#include<storage/lmgr.h>
4750
#include<storage/smgr.h>
48-
#include<parser/catalog_utils.h>
49-
#include<parser/parse_query.h>
5051
#include<rewrite/rewriteRemove.h>
5152
#include<utils/builtins.h>
5253
#include<utils/mcxt.h>
@@ -722,8 +723,8 @@ addNewRelationType(char *typeName, Oid new_rel_oid)
722723
*/
723724
new_type_oid=TypeCreate(typeName,/* type name */
724725
new_rel_oid,/* relation oid */
725-
tlen(type("oid")),/* internal size */
726-
tlen(type("oid")),/* external size */
726+
typeLen(typeidType(OIDOID)),/* internal size */
727+
typeLen(typeidType(OIDOID)),/* external size */
727728
'c',/* type-type (catalog) */
728729
',',/* default array delimiter */
729730
"int4in",/* input procedure */

‎src/backend/catalog/index.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.29 1997/11/24 05:08:11 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.30 1997/11/25 21:58:43 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -30,26 +30,27 @@
3030
#include<fmgr.h>
3131
#include<access/genam.h>
3232
#include<access/heapam.h>
33-
#include<storage/lmgr.h>
34-
#include<miscadmin.h>
33+
#include<access/istrat.h>
3534
#include<access/xact.h>
36-
#include<parser/catalog_utils.h>
37-
#include<storage/smgr.h>
38-
#include<utils/builtins.h>
39-
#include<utils/mcxt.h>
40-
#include<utils/relcache.h>
41-
#include<utils/syscache.h>
42-
#include<utils/tqual.h>
4335
#include<bootstrap/bootstrap.h>
4436
#include<catalog/catname.h>
4537
#include<catalog/catalog.h>
4638
#include<catalog/indexing.h>
4739
#include<catalog/heap.h>
4840
#include<catalog/index.h>
41+
#include<catalog/pg_type.h>
4942
#include<executor/executor.h>
43+
#include<miscadmin.h>
5044
#include<optimizer/clauses.h>
5145
#include<optimizer/prep.h>
52-
#include<access/istrat.h>
46+
#include<parser/parse_func.h>
47+
#include<storage/lmgr.h>
48+
#include<storage/smgr.h>
49+
#include<utils/builtins.h>
50+
#include<utils/mcxt.h>
51+
#include<utils/relcache.h>
52+
#include<utils/syscache.h>
53+
#include<utils/tqual.h>
5354

5455
#ifndefHAVE_MEMMOVE
5556
#include<regex/utils.h>

‎src/backend/catalog/pg_operator.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.16 1997/11/24 05:08:15 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.17 1997/11/25 21:58:46 momjian Exp $
1111
*
1212
* NOTES
1313
* these routines moved here from commands/define.c and somewhat cleaned up.
@@ -20,9 +20,10 @@
2020
#include<utils/syscache.h>
2121
#include<utils/tqual.h>
2222
#include<access/heapam.h>
23-
#include<parser/catalog_utils.h>
2423
#include<catalog/catname.h>
2524
#include<catalog/pg_operator.h>
25+
#include<catalog/pg_type.h>
26+
#include<parser/parse_oper.h>
2627
#include<storage/bufmgr.h>
2728
#include<fmgr.h>
2829
#include<miscadmin.h>

‎src/backend/catalog/pg_proc.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.9 1997/09/18 20:20:18 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.10 1997/11/25 21:58:48 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include<postgres.h>
1515

16+
#include<fmgr.h>
17+
#include<miscadmin.h>
1618
#include<utils/syscache.h>
1719
#include<catalog/pg_proc.h>
1820
#include<access/heapam.h>
1921
#include<access/relscan.h>
20-
#include<fmgr.h>
21-
#include<utils/builtins.h>
22-
#include<utils/sets.h>
2322
#include<catalog/catname.h>
2423
#include<catalog/indexing.h>
25-
#include<parser/parse_query.h>
24+
#include<catalog/pg_type.h>
25+
#include<parser/parse_node.h>
2626
#include<tcop/tcopprot.h>
27-
#include<parser/catalog_utils.h>
27+
#include<utils/builtins.h>
28+
#include<utils/sets.h>
29+
#include<utils/lsyscache.h>
2830
#include<optimizer/internal.h>
2931
#include<optimizer/planner.h>
30-
#include<utils/lsyscache.h>
31-
#include<miscadmin.h>
3232
#ifndefHAVE_MEMMOVE
3333
#include<regex/utils.h>
3434
#else
@@ -200,7 +200,7 @@ ProcedureCreate(char *procedureName,
200200
if (parameterCount==1&&
201201
(toid=TypeGet(strVal(lfirst(argList)),&defined))&&
202202
defined&&
203-
(relid=typeid_get_relid(toid))!=0&&
203+
(relid=typeidTypeRelid(toid))!=0&&
204204
get_attnum(relid,procedureName)!=InvalidAttrNumber)
205205
elog(WARN,"method %s already an attribute of type %s",
206206
procedureName,strVal(lfirst(argList)));

‎src/backend/catalog/pg_type.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.13 1997/11/24 05:08:17 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.14 1997/11/25 21:58:50 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -20,9 +20,10 @@
2020
#include<utils/builtins.h>
2121
#include<utils/tqual.h>
2222
#include<fmgr.h>
23-
#include<parser/catalog_utils.h>
2423
#include<catalog/catname.h>
2524
#include<catalog/indexing.h>
25+
#include<catalog/pg_type.h>
26+
#include<parser/parse_func.h>
2627
#include<storage/lmgr.h>
2728
#include<miscadmin.h>
2829
#ifndefHAVE_MEMMOVE

‎src/backend/commands/_deadcode/version.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.7 1997/09/08 02:22:18 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.8 1997/11/25 21:59:11 momjian Exp $
1414
*
1515
* NOTES
1616
* At the point the version is defined, 2 physical relations are created
@@ -30,6 +30,7 @@
3030
#include<utils/builtins.h>
3131
#include<commands/version.h>
3232
#include<access/xact.h>/* for GetCurrentXactStartTime */
33+
#include<parser/parse_node.h>
3334
#include<tcop/tcopprot.h>
3435

3536
#defineMAX_QUERY_LEN 1024

‎src/backend/commands/explain.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.14 1997/09/18 20:20:22 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.15 1997/11/25 21:58:53 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -16,12 +16,11 @@
1616

1717
#include<postgres.h>
1818

19-
#include<parser/catalog_utils.h>
20-
#include<parser/parse_query.h>/* for MakeTimeRange() */
2119
#include<nodes/plannodes.h>
2220
#include<tcop/tcopprot.h>
2321
#include<lib/stringinfo.h>
2422
#include<commands/explain.h>
23+
#include<parser/parse_node.h>
2524
#include<optimizer/planner.h>
2625
#include<access/xact.h>
2726

‎src/backend/commands/recipe.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.12 1997/11/21 18:09:51 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.13 1997/11/25 21:59:00 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -20,9 +20,9 @@
2020
#include<catalog/pg_type.h>
2121
#include<commands/recipe.h>
2222
#include<libpq/libpq-be.h>
23+
#include<parser/parse_node.h>
2324
#include<utils/builtins.h>
2425
#include<utils/relcache.h>/* for RelationNameGetRelation */
25-
#include<parser/parse_query.h>
2626
#include<rewrite/rewriteHandler.h>
2727
#include<rewrite/rewriteManip.h>
2828
#include<tcop/pquery.h>
@@ -488,7 +488,7 @@ tg_replaceNumberedParam(Node *expression,
488488
* "result" attribute from the tee relation
489489
*/
490490

491-
isRel= (typeid_get_relid(p->paramtype)!=0);
491+
isRel= (typeidTypeRelid(p->paramtype)!=0);
492492
if (isRel)
493493
{
494494
newVar=makeVar(rt_ind,

‎src/backend/commands/remove.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.16 1997/11/20 23:21:13 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.17 1997/11/2521:59:03 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -24,7 +24,8 @@
2424
#include<catalog/pg_language.h>
2525
#include<catalog/pg_operator.h>
2626
#include<catalog/pg_proc.h>
27-
#include<parser/catalog_utils.h>
27+
#include<catalog/pg_type.h>
28+
#include<parser/parse_func.h>
2829
#include<storage/bufmgr.h>
2930
#include<fmgr.h>
3031
#ifndefHAVE_MEMMOVE

‎src/backend/commands/vacuum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.52 1997/11/21 19:59:34 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.53 1997/11/25 21:59:09 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -36,6 +36,7 @@
3636
#include<catalog/pg_statistic.h>
3737
#include<catalog/pg_type.h>
3838
#include<catalog/pg_operator.h>
39+
#include<parser/parse_oper.h>
3940
#include<storage/smgr.h>
4041
#include<storage/lmgr.h>
4142
#include<utils/inval.h>
@@ -44,7 +45,6 @@
4445
#include<utils/syscache.h>
4546
#include<utils/builtins.h>
4647
#include<commands/vacuum.h>
47-
#include<parser/catalog_utils.h>
4848
#include<storage/bufpage.h>
4949
#include"storage/shmem.h"
5050
#ifndefHAVE_GETRUSAGE

‎src/backend/commands/view.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.15 1997/11/21 18:09:58 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.16 1997/11/25 21:59:12 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -21,8 +21,8 @@
2121
#include<access/xact.h>
2222
#include<utils/builtins.h>
2323
#include<nodes/relation.h>
24-
#include<parser/catalog_utils.h>
25-
#include<parser/parse_query.h>
24+
#include<parser/parse_relation.h>
25+
#include<parser/parse_type.h>
2626
#include<rewrite/rewriteDefine.h>
2727
#include<rewrite/rewriteHandler.h>
2828
#include<rewrite/rewriteManip.h>
@@ -72,7 +72,7 @@ DefineVirtualRelation(char *relname, List *tlist)
7272
entry=lfirst(t);
7373
res=entry->resdom;
7474
resname=res->resname;
75-
restypename=tname(get_id_type(res->restype));
75+
restypename=typeidTypeName(res->restype);
7676

7777
typename=makeNode(TypeName);
7878

‎src/backend/executor/execTuples.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* IDENTIFICATION
17-
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.10 1997/09/18 20:20:32 momjian Exp $
17+
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.11 1997/11/25 21:59:16 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -125,11 +125,11 @@
125125
#undef ExecStoreTuple
126126

127127
#include"access/tupdesc.h"
128+
#include"catalog/pg_type.h"
129+
#include"parser/parse_type.h"
130+
#include"storage/bufmgr.h"
128131
#include"utils/palloc.h"
129132
#include"utils/lsyscache.h"
130-
#include"storage/bufmgr.h"
131-
#include"parser/catalog_utils.h"
132-
#include"catalog/pg_type.h"
133133

134134
staticTupleTableSlot*NodeGetResultTupleSlot(Plan*node);
135135

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp