Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
585c9677
Commit
585c9677
authored
May 17, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change resjunk to a boolean.
parent
fd164770
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
63 additions
and
63 deletions
+63
-63
src/backend/executor/execJunk.c
src/backend/executor/execJunk.c
+8
-8
src/backend/nodes/makefuncs.c
src/backend/nodes/makefuncs.c
+2
-2
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+3
-3
src/backend/nodes/readfuncs.c
src/backend/nodes/readfuncs.c
+2
-2
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/planner.c
+2
-2
src/backend/optimizer/prep/preptlist.c
src/backend/optimizer/prep/preptlist.c
+7
-7
src/backend/optimizer/util/tlist.c
src/backend/optimizer/util/tlist.c
+4
-4
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+2
-2
src/backend/parser/parse_clause.c
src/backend/parser/parse_clause.c
+4
-4
src/backend/parser/parse_func.c
src/backend/parser/parse_func.c
+3
-3
src/backend/parser/parse_relation.c
src/backend/parser/parse_relation.c
+2
-2
src/backend/parser/parse_target.c
src/backend/parser/parse_target.c
+10
-9
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteHandler.c
+2
-2
src/include/nodes/makefuncs.h
src/include/nodes/makefuncs.h
+2
-2
src/include/nodes/primnodes.h
src/include/nodes/primnodes.h
+4
-5
src/include/parser/parse_target.h
src/include/parser/parse_target.h
+3
-3
src/man/explain.l
src/man/explain.l
+3
-3
No files found.
src/backend/executor/execJunk.c
View file @
585c9677
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.1
6 1999/02/13 23:15:16
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.1
7 1999/05/17 17:03:10
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
*
*
* The general idea is the following: A target list consists of a list of
* The general idea is the following: A target list consists of a list of
* Resdom nodes & expression pairs. Each Resdom node has an attribute
* Resdom nodes & expression pairs. Each Resdom node has an attribute
* called 'resjunk'. If the value of this attribute is
1
then the
* called 'resjunk'. If the value of this attribute is
true
then the
* corresponding attribute is a "junk" attribute.
* corresponding attribute is a "junk" attribute.
*
*
* When we initialize a plan we call 'ExecInitJunkFilter' to create
* When we initialize a plan we call 'ExecInitJunkFilter' to create
...
@@ -73,7 +73,7 @@ ExecInitJunkFilter(List *targetList)
...
@@ -73,7 +73,7 @@ ExecInitJunkFilter(List *targetList)
TargetEntry
*
tle
;
TargetEntry
*
tle
;
Resdom
*
resdom
,
Resdom
*
resdom
,
*
cleanResdom
;
*
cleanResdom
;
int
resjunk
;
bool
resjunk
;
AttrNumber
cleanResno
;
AttrNumber
cleanResno
;
AttrNumber
*
cleanMap
;
AttrNumber
*
cleanMap
;
Size
size
;
Size
size
;
...
@@ -81,7 +81,7 @@ ExecInitJunkFilter(List *targetList)
...
@@ -81,7 +81,7 @@ ExecInitJunkFilter(List *targetList)
/* ---------------------
/* ---------------------
* First find the "clean" target list, i.e. all the entries
* First find the "clean" target list, i.e. all the entries
* in the original target list which have a
zero
'resjunk'
* in the original target list which have a
false
'resjunk'
* NOTE: make copy of the Resdom nodes, because we have
* NOTE: make copy of the Resdom nodes, because we have
* to change the 'resno's...
* to change the 'resno's...
* ---------------------
* ---------------------
...
@@ -98,7 +98,7 @@ ExecInitJunkFilter(List *targetList)
...
@@ -98,7 +98,7 @@ ExecInitJunkFilter(List *targetList)
resdom
=
rtarget
->
resdom
;
resdom
=
rtarget
->
resdom
;
expr
=
rtarget
->
expr
;
expr
=
rtarget
->
expr
;
resjunk
=
resdom
->
resjunk
;
resjunk
=
resdom
->
resjunk
;
if
(
resjunk
==
0
)
if
(
!
resjunk
)
{
{
/*
/*
...
@@ -194,7 +194,7 @@ ExecInitJunkFilter(List *targetList)
...
@@ -194,7 +194,7 @@ ExecInitJunkFilter(List *targetList)
resdom
=
tle
->
resdom
;
resdom
=
tle
->
resdom
;
expr
=
tle
->
expr
;
expr
=
tle
->
expr
;
resjunk
=
resdom
->
resjunk
;
resjunk
=
resdom
->
resjunk
;
if
(
resjunk
==
0
)
if
(
!
resjunk
)
{
{
cleanMap
[
cleanResno
-
1
]
=
resdom
->
resno
;
cleanMap
[
cleanResno
-
1
]
=
resdom
->
resno
;
cleanResno
++
;
cleanResno
++
;
...
@@ -271,7 +271,7 @@ ExecGetJunkAttribute(JunkFilter *junkfilter,
...
@@ -271,7 +271,7 @@ ExecGetJunkAttribute(JunkFilter *junkfilter,
Resdom
*
resdom
;
Resdom
*
resdom
;
AttrNumber
resno
;
AttrNumber
resno
;
char
*
resname
;
char
*
resname
;
int
resjunk
;
bool
resjunk
;
TupleDesc
tupType
;
TupleDesc
tupType
;
HeapTuple
tuple
;
HeapTuple
tuple
;
...
@@ -290,7 +290,7 @@ ExecGetJunkAttribute(JunkFilter *junkfilter,
...
@@ -290,7 +290,7 @@ ExecGetJunkAttribute(JunkFilter *junkfilter,
resdom
=
tle
->
resdom
;
resdom
=
tle
->
resdom
;
resname
=
resdom
->
resname
;
resname
=
resdom
->
resname
;
resjunk
=
resdom
->
resjunk
;
resjunk
=
resdom
->
resjunk
;
if
(
resjunk
!=
0
&&
(
strcmp
(
resname
,
attrName
)
==
0
))
if
(
resjunk
&&
(
strcmp
(
resname
,
attrName
)
==
0
))
{
{
/* We found it ! */
/* We found it ! */
resno
=
resdom
->
resno
;
resno
=
resdom
->
resno
;
...
...
src/backend/nodes/makefuncs.c
View file @
585c9677
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.1
4 1999/05/12 15:01:34 wieck
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.1
5 1999/05/17 17:03:12 momjian
Exp $
*
*
* NOTES
* NOTES
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
...
@@ -97,7 +97,7 @@ makeResdom(AttrNumber resno,
...
@@ -97,7 +97,7 @@ makeResdom(AttrNumber resno,
char
*
resname
,
char
*
resname
,
Index
reskey
,
Index
reskey
,
Oid
reskeyop
,
Oid
reskeyop
,
int
resjunk
)
bool
resjunk
)
{
{
Resdom
*
resdom
=
makeNode
(
Resdom
);
Resdom
*
resdom
=
makeNode
(
Resdom
);
...
...
src/backend/nodes/outfuncs.c
View file @
585c9677
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: outfuncs.c,v 1.8
1 1999/05/12 15:01:34 wieck
Exp $
* $Id: outfuncs.c,v 1.8
2 1999/05/17 17:03:13 momjian
Exp $
*
*
* NOTES
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
* Every (plan) node in POSTGRES has an associated "out" routine which
...
@@ -565,9 +565,9 @@ _outResdom(StringInfo str, Resdom *node)
...
@@ -565,9 +565,9 @@ _outResdom(StringInfo str, Resdom *node)
node
->
reskey
,
node
->
reskey
,
node
->
reskeyop
);
node
->
reskeyop
);
appendStringInfo
(
str
,
" :resgroupref %d :resjunk %
d
"
,
appendStringInfo
(
str
,
" :resgroupref %d :resjunk %
s
"
,
node
->
resgroupref
,
node
->
resgroupref
,
node
->
resjunk
);
node
->
resjunk
?
"true"
:
"false"
);
}
}
static
void
static
void
...
...
src/backend/nodes/readfuncs.c
View file @
585c9677
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.6
1 1999/05/12 15:01:35 wieck
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.6
2 1999/05/17 17:03:14 momjian
Exp $
*
*
* NOTES
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
* Most of the read functions for plan nodes are tested. (In fact, they
...
@@ -751,7 +751,7 @@ _readResdom()
...
@@ -751,7 +751,7 @@ _readResdom()
token
=
lsptok
(
NULL
,
&
length
);
/* eat :resjunk */
token
=
lsptok
(
NULL
,
&
length
);
/* eat :resjunk */
token
=
lsptok
(
NULL
,
&
length
);
/* get resjunk */
token
=
lsptok
(
NULL
,
&
length
);
/* get resjunk */
local_node
->
resjunk
=
atoi
(
token
)
;
local_node
->
resjunk
=
(
token
[
0
]
==
't'
)
?
true
:
false
;
return
local_node
;
return
local_node
;
}
}
...
...
src/backend/optimizer/plan/planner.c
View file @
585c9677
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.5
2 1999/05/13 07:28:32 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.5
3 1999/05/17 17:03:15 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -168,7 +168,7 @@ union_planner(Query *parse)
...
@@ -168,7 +168,7 @@ union_planner(Query *parse)
resname
,
resname
,
0
,
0
,
0
,
0
,
1
);
true
);
var
=
makeVar
(
rowmark
->
rti
,
-
1
,
TIDOID
,
var
=
makeVar
(
rowmark
->
rti
,
-
1
,
TIDOID
,
-
1
,
0
,
rowmark
->
rti
,
-
1
);
-
1
,
0
,
rowmark
->
rti
,
-
1
);
...
...
src/backend/optimizer/prep/preptlist.c
View file @
585c9677
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.
19 1999/05/12 15:01:41 wieck
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.
20 1999/05/17 17:03:18 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -106,7 +106,7 @@ preprocess_targetlist(List *tlist,
...
@@ -106,7 +106,7 @@ preprocess_targetlist(List *tlist,
"ctid"
,
"ctid"
,
0
,
0
,
0
,
0
,
1
);
true
);
var
=
makeVar
(
result_relation
,
-
1
,
TIDOID
,
-
1
,
0
,
result_relation
,
-
1
);
var
=
makeVar
(
result_relation
,
-
1
,
TIDOID
,
-
1
,
0
,
result_relation
,
-
1
);
...
@@ -211,7 +211,7 @@ replace_matching_resname(List *new_tlist, List *old_tlist)
...
@@ -211,7 +211,7 @@ replace_matching_resname(List *new_tlist, List *old_tlist)
* locks.
* locks.
*
*
* So, copy all these entries to the end of the target list and set their
* So, copy all these entries to the end of the target list and set their
* 'resjunk' value to
1
to show that these are special attributes and
* 'resjunk' value to
true
to show that these are special attributes and
* have to be treated specially by the executor!
* have to be treated specially by the executor!
*/
*/
foreach
(
temp
,
old_tlist
)
foreach
(
temp
,
old_tlist
)
...
@@ -225,7 +225,7 @@ replace_matching_resname(List *new_tlist, List *old_tlist)
...
@@ -225,7 +225,7 @@ replace_matching_resname(List *new_tlist, List *old_tlist)
{
{
newresno
=
(
Resdom
*
)
copyObject
((
Node
*
)
old_tle
->
resdom
);
newresno
=
(
Resdom
*
)
copyObject
((
Node
*
)
old_tle
->
resdom
);
newresno
->
resno
=
length
(
t_list
)
+
1
;
newresno
->
resno
=
length
(
t_list
)
+
1
;
newresno
->
resjunk
=
1
;
newresno
->
resjunk
=
true
;
new_tl
=
makeTargetEntry
(
newresno
,
old_tle
->
expr
);
new_tl
=
makeTargetEntry
(
newresno
,
old_tle
->
expr
);
t_list
=
lappend
(
t_list
,
new_tl
);
t_list
=
lappend
(
t_list
,
new_tl
);
}
}
...
@@ -267,7 +267,7 @@ replace_matching_resname(List *new_tlist, List *old_tlist)
...
@@ -267,7 +267,7 @@ replace_matching_resname(List *new_tlist, List *old_tlist)
{
{
newresno
=
(
Resdom
*
)
copyObject
((
Node
*
)
old_tle
->
resdom
);
newresno
=
(
Resdom
*
)
copyObject
((
Node
*
)
old_tle
->
resdom
);
newresno
->
resno
=
length
(
t_list
)
+
1
;
newresno
->
resno
=
length
(
t_list
)
+
1
;
newresno
->
resjunk
=
1
;
newresno
->
resjunk
=
true
;
new_tl
=
makeTargetEntry
(
newresno
,
old_tle
->
expr
);
new_tl
=
makeTargetEntry
(
newresno
,
old_tle
->
expr
);
t_list
=
lappend
(
t_list
,
new_tl
);
t_list
=
lappend
(
t_list
,
new_tl
);
}
}
...
@@ -338,7 +338,7 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
...
@@ -338,7 +338,7 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
attname
,
attname
,
0
,
0
,
(
Oid
)
0
,
(
Oid
)
0
,
0
),
false
),
(
Node
*
)
temp2
);
(
Node
*
)
temp2
);
t_list
=
lappend
(
t_list
,
temp3
);
t_list
=
lappend
(
t_list
,
temp3
);
break
;
break
;
...
@@ -358,7 +358,7 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
...
@@ -358,7 +358,7 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
attname
,
attname
,
0
,
0
,
(
Oid
)
0
,
(
Oid
)
0
,
0
),
false
),
(
Node
*
)
temp_var
);
(
Node
*
)
temp_var
);
t_list
=
lappend
(
t_list
,
temp_list
);
t_list
=
lappend
(
t_list
,
temp_list
);
break
;
break
;
...
...
src/backend/optimizer/util/tlist.c
View file @
585c9677
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.3
0 1999/05/12 15:01:44 wieck
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.3
1 1999/05/17 17:03:23 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -138,7 +138,7 @@ create_tl_element(Var *var, int resdomno)
...
@@ -138,7 +138,7 @@ create_tl_element(Var *var, int resdomno)
NULL
,
NULL
,
(
Index
)
0
,
(
Index
)
0
,
(
Oid
)
0
,
(
Oid
)
0
,
0
),
false
),
(
Node
*
)
var
);
(
Node
*
)
var
);
}
}
...
@@ -379,7 +379,7 @@ flatten_tlist(List *tlist)
...
@@ -379,7 +379,7 @@ flatten_tlist(List *tlist)
NULL
,
NULL
,
(
Index
)
0
,
(
Index
)
0
,
(
Oid
)
0
,
(
Oid
)
0
,
0
);
false
);
last_resdomno
++
;
last_resdomno
++
;
new_tlist
=
lappend
(
new_tlist
,
makeTargetEntry
(
r
,
(
Node
*
)
var
));
new_tlist
=
lappend
(
new_tlist
,
makeTargetEntry
(
r
,
(
Node
*
)
var
));
}
}
...
@@ -573,7 +573,7 @@ AddGroupAttrToTlist(List *tlist, List *grpCl)
...
@@ -573,7 +573,7 @@ AddGroupAttrToTlist(List *tlist, List *grpCl)
NULL
,
NULL
,
(
Index
)
0
,
(
Index
)
0
,
(
Oid
)
0
,
(
Oid
)
0
,
0
);
false
);
last_resdomno
++
;
last_resdomno
++
;
tlist
=
lappend
(
tlist
,
makeTargetEntry
(
r
,
(
Node
*
)
var
));
tlist
=
lappend
(
tlist
,
makeTargetEntry
(
r
,
(
Node
*
)
var
));
}
}
...
...
src/backend/parser/analyze.c
View file @
585c9677
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: analyze.c,v 1.10
5 1999/05/17 04:50:07 tgl
Exp $
* $Id: analyze.c,v 1.10
6 1999/05/17 17:03:27 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -338,7 +338,7 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
...
@@ -338,7 +338,7 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
att
[
defval
[
ndef
].
adnum
-
1
]
->
atttypid
,
att
[
defval
[
ndef
].
adnum
-
1
]
->
atttypid
,
att
[
defval
[
ndef
].
adnum
-
1
]
->
atttypmod
,
att
[
defval
[
ndef
].
adnum
-
1
]
->
atttypmod
,
pstrdup
(
nameout
(
&
(
att
[
defval
[
ndef
].
adnum
-
1
]
->
attname
))),
pstrdup
(
nameout
(
&
(
att
[
defval
[
ndef
].
adnum
-
1
]
->
attname
))),
0
,
0
,
0
),
0
,
0
,
false
),
(
Node
*
)
stringToNode
(
defval
[
ndef
].
adbin
));
(
Node
*
)
stringToNode
(
defval
[
ndef
].
adbin
));
qry
->
targetList
=
lappend
(
qry
->
targetList
,
te
);
qry
->
targetList
=
lappend
(
qry
->
targetList
,
te
);
}
}
...
...
src/backend/parser/parse_clause.c
View file @
585c9677
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.3
2 1999/05/13 14:59:05 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.3
3 1999/05/17 17:03:32 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -495,14 +495,14 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
...
@@ -495,14 +495,14 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
case
T_Attr
:
case
T_Attr
:
target_result
=
MakeTargetEntryIdent
(
pstate
,
node
,
target_result
=
MakeTargetEntryIdent
(
pstate
,
node
,
&
((
Attr
*
)
node
)
->
relname
,
NULL
,
&
((
Attr
*
)
node
)
->
relname
,
NULL
,
((
Attr
*
)
node
)
->
relname
,
TRUE
);
((
Attr
*
)
node
)
->
relname
,
true
);
lappend
(
tlist
,
target_result
);
lappend
(
tlist
,
target_result
);
break
;
break
;
case
T_Ident
:
case
T_Ident
:
target_result
=
MakeTargetEntryIdent
(
pstate
,
node
,
target_result
=
MakeTargetEntryIdent
(
pstate
,
node
,
&
((
Ident
*
)
node
)
->
name
,
NULL
,
&
((
Ident
*
)
node
)
->
name
,
NULL
,
((
Ident
*
)
node
)
->
name
,
TRUE
);
((
Ident
*
)
node
)
->
name
,
true
);
lappend
(
tlist
,
target_result
);
lappend
(
tlist
,
target_result
);
break
;
break
;
...
@@ -517,7 +517,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
...
@@ -517,7 +517,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
case
T_FuncCall
:
case
T_FuncCall
:
case
T_A_Expr
:
case
T_A_Expr
:
target_result
=
MakeTargetEntryExpr
(
pstate
,
"resjunk"
,
expr
,
FALSE
,
TRUE
);
target_result
=
MakeTargetEntryExpr
(
pstate
,
"resjunk"
,
expr
,
false
,
true
);
lappend
(
tlist
,
target_result
);
lappend
(
tlist
,
target_result
);
break
;
break
;
...
...
src/backend/parser/parse_func.c
View file @
585c9677
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.4
3 1999/05/10 00:45:27
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.4
4 1999/05/17 17:03:33
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1352,7 +1352,7 @@ setup_tlist(char *attname, Oid relid)
...
@@ -1352,7 +1352,7 @@ setup_tlist(char *attname, Oid relid)
get_attname
(
relid
,
attno
),
get_attname
(
relid
,
attno
),
0
,
0
,
(
Oid
)
0
,
(
Oid
)
0
,
0
);
false
);
varnode
=
makeVar
(
-
1
,
attno
,
typeid
,
type_mod
,
0
,
-
1
,
attno
);
varnode
=
makeVar
(
-
1
,
attno
,
typeid
,
type_mod
,
0
,
-
1
,
attno
);
tle
=
makeTargetEntry
(
resnode
,
(
Node
*
)
varnode
);
tle
=
makeTargetEntry
(
resnode
,
(
Node
*
)
varnode
);
...
@@ -1377,7 +1377,7 @@ setup_base_tlist(Oid typeid)
...
@@ -1377,7 +1377,7 @@ setup_base_tlist(Oid typeid)
"<noname>"
,
"<noname>"
,
0
,
0
,
(
Oid
)
0
,
(
Oid
)
0
,
0
);
false
);
varnode
=
makeVar
(
-
1
,
1
,
typeid
,
-
1
,
0
,
-
1
,
1
);
varnode
=
makeVar
(
-
1
,
1
,
typeid
,
-
1
,
0
,
-
1
,
1
);
tle
=
makeTargetEntry
(
resnode
,
(
Node
*
)
varnode
);
tle
=
makeTargetEntry
(
resnode
,
(
Node
*
)
varnode
);
...
...
src/backend/parser/parse_relation.c
View file @
585c9677
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.
19 1999/02/23 07:53:01 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.
20 1999/05/17 17:03:34 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -283,7 +283,7 @@ expandAll(ParseState *pstate, char *relname, char *refname, int *this_resno)
...
@@ -283,7 +283,7 @@ expandAll(ParseState *pstate, char *relname, char *refname, int *this_resno)
attrname
,
attrname
,
(
Index
)
0
,
(
Index
)
0
,
(
Oid
)
0
,
(
Oid
)
0
,
0
);
false
);
te
->
expr
=
(
Node
*
)
varnode
;
te
->
expr
=
(
Node
*
)
varnode
;
if
(
te_head
==
NIL
)
if
(
te_head
==
NIL
)
te_head
=
te_tail
=
lcons
(
te
,
NIL
);
te_head
=
te_tail
=
lcons
(
te
,
NIL
);
...
...
src/backend/parser/parse_target.c
View file @
585c9677
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.3
6 1999/05/17 04:19:33
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.3
7 1999/05/17 17:03:35
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -60,7 +60,7 @@ MakeTargetEntryIdent(ParseState *pstate,
...
@@ -60,7 +60,7 @@ MakeTargetEntryIdent(ParseState *pstate,
char
**
resname
,
char
**
resname
,
char
*
refname
,
char
*
refname
,
char
*
colname
,
char
*
colname
,
int16
resjunk
)
bool
resjunk
)
{
{
Node
*
expr
=
NULL
;
Node
*
expr
=
NULL
;
Oid
attrtype_target
;
Oid
attrtype_target
;
...
@@ -123,7 +123,7 @@ MakeTargetEntryIdent(ParseState *pstate,
...
@@ -123,7 +123,7 @@ MakeTargetEntryIdent(ParseState *pstate,
{
{
expr
=
coerce_type
(
pstate
,
node
,
attrtype_id
,
attrtype_target
);
expr
=
coerce_type
(
pstate
,
node
,
attrtype_id
,
attrtype_target
);
expr
=
transformExpr
(
pstate
,
expr
,
EXPR_COLUMN_FIRST
);
expr
=
transformExpr
(
pstate
,
expr
,
EXPR_COLUMN_FIRST
);
tent
=
MakeTargetEntryExpr
(
pstate
,
*
resname
,
expr
,
FALSE
,
FALSE
);
tent
=
MakeTargetEntryExpr
(
pstate
,
*
resname
,
expr
,
false
,
false
);
expr
=
tent
->
expr
;
expr
=
tent
->
expr
;
}
}
else
else
...
@@ -185,7 +185,7 @@ MakeTargetEntryExpr(ParseState *pstate,
...
@@ -185,7 +185,7 @@ MakeTargetEntryExpr(ParseState *pstate,
char
*
colname
,
char
*
colname
,
Node
*
expr
,
Node
*
expr
,
List
*
arrayRef
,
List
*
arrayRef
,
int16
resjunk
)
bool
resjunk
)
{
{
Oid
type_id
,
Oid
type_id
,
attrtype
;
attrtype
;
...
@@ -345,7 +345,7 @@ MakeTargetEntryCase(ParseState *pstate,
...
@@ -345,7 +345,7 @@ MakeTargetEntryCase(ParseState *pstate,
res
->
name
,
res
->
name
,
(
Index
)
0
,
(
Index
)
0
,
(
Oid
)
0
,
(
Oid
)
0
,
0
);
false
);
tent
=
makeNode
(
TargetEntry
);
tent
=
makeNode
(
TargetEntry
);
tent
->
resdom
=
resnode
;
tent
->
resdom
=
resnode
;
...
@@ -426,7 +426,7 @@ MakeTargetEntryComplex(ParseState *pstate,
...
@@ -426,7 +426,7 @@ MakeTargetEntryComplex(ParseState *pstate,
constval
->
val
.
str
=
save_str
;
constval
->
val
.
str
=
save_str
;
return
MakeTargetEntryExpr
(
pstate
,
res
->
name
,
return
MakeTargetEntryExpr
(
pstate
,
res
->
name
,
(
Node
*
)
make_const
(
constval
),
(
Node
*
)
make_const
(
constval
),
NULL
,
FALSE
);
NULL
,
false
);
pfree
(
save_str
);
pfree
(
save_str
);
}
}
else
else
...
@@ -458,7 +458,7 @@ MakeTargetEntryComplex(ParseState *pstate,
...
@@ -458,7 +458,7 @@ MakeTargetEntryComplex(ParseState *pstate,
}
}
res
->
name
=
colname
;
res
->
name
=
colname
;
return
MakeTargetEntryExpr
(
pstate
,
res
->
name
,
expr
,
return
MakeTargetEntryExpr
(
pstate
,
res
->
name
,
expr
,
res
->
indirection
,
FALSE
);
res
->
indirection
,
false
);
}
}
}
}
...
@@ -531,7 +531,7 @@ MakeTargetEntryAttr(ParseState *pstate,
...
@@ -531,7 +531,7 @@ MakeTargetEntryAttr(ParseState *pstate,
resname
,
resname
,
(
Index
)
0
,
(
Index
)
0
,
(
Oid
)
0
,
(
Oid
)
0
,
0
);
false
);
tent
=
makeNode
(
TargetEntry
);
tent
=
makeNode
(
TargetEntry
);
tent
->
resdom
=
resnode
;
tent
->
resdom
=
resnode
;
tent
->
expr
=
result
;
tent
->
expr
=
result
;
...
@@ -560,7 +560,8 @@ transformTargetList(ParseState *pstate, List *targetlist)
...
@@ -560,7 +560,8 @@ transformTargetList(ParseState *pstate, List *targetlist)
char
*
identname
;
char
*
identname
;
identname
=
((
Ident
*
)
res
->
val
)
->
name
;
identname
=
((
Ident
*
)
res
->
val
)
->
name
;
tent
=
MakeTargetEntryIdent
(
pstate
,
(
Node
*
)
res
->
val
,
&
res
->
name
,
NULL
,
identname
,
FALSE
);
tent
=
MakeTargetEntryIdent
(
pstate
,
(
Node
*
)
res
->
val
,
&
res
->
name
,
NULL
,
identname
,
false
);
break
;
break
;
}
}
case
T_ParamNo
:
case
T_ParamNo
:
...
...
src/backend/rewrite/rewriteHandler.c
View file @
585c9677
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.4
1 1999/05/13 07:28:41 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.4
2 1999/05/17 17:03:38 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1063,7 +1063,7 @@ modifyAggrefMakeSublink(Expr *origexp, Query *parsetree)
...
@@ -1063,7 +1063,7 @@ modifyAggrefMakeSublink(Expr *origexp, Query *parsetree)
resdom
->
resname
=
pstrdup
(
"<noname>"
);
resdom
->
resname
=
pstrdup
(
"<noname>"
);
resdom
->
reskey
=
0
;
resdom
->
reskey
=
0
;
resdom
->
reskeyop
=
0
;
resdom
->
reskeyop
=
0
;
resdom
->
resjunk
=
0
;
resdom
->
resjunk
=
false
;
tle
->
resdom
=
resdom
;
tle
->
resdom
=
resdom
;
tle
->
expr
=
(
Node
*
)
aggref
;
tle
->
expr
=
(
Node
*
)
aggref
;
...
...
src/include/nodes/makefuncs.h
View file @
585c9677
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: makefuncs.h,v 1.1
6 1999/02/13 23:21:38
momjian Exp $
* $Id: makefuncs.h,v 1.1
7 1999/05/17 17:03:42
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -39,7 +39,7 @@ extern Resdom *makeResdom(AttrNumber resno,
...
@@ -39,7 +39,7 @@ extern Resdom *makeResdom(AttrNumber resno,
char
*
resname
,
char
*
resname
,
Index
reskey
,
Index
reskey
,
Oid
reskeyop
,
Oid
reskeyop
,
int
resjunk
);
bool
resjunk
);
extern
Const
*
makeConst
(
Oid
consttype
,
extern
Const
*
makeConst
(
Oid
consttype
,
int
constlen
,
int
constlen
,
...
...
src/include/nodes/primnodes.h
View file @
585c9677
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: primnodes.h,v 1.2
6 1999/05/12 15:02:07 wieck
Exp $
* $Id: primnodes.h,v 1.2
7 1999/05/17 17:03:44 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -31,9 +31,8 @@
...
@@ -31,9 +31,8 @@
* reskey - order of key in a sort (for those > 0)
* reskey - order of key in a sort (for those > 0)
* reskeyop - sort operator Oid
* reskeyop - sort operator Oid
* resgroupref - set to nonzero if referenced from a group by clause
* resgroupref - set to nonzero if referenced from a group by clause
* resjunk - set to nonzero to eliminate the attribute
* resjunk - set to true to eliminate the attribute
* from final target list e.g., ctid for replace
* from final target list
* and delete
*
*
* ----------------
* ----------------
*/
*/
...
@@ -47,7 +46,7 @@ typedef struct Resdom
...
@@ -47,7 +46,7 @@ typedef struct Resdom
Index
reskey
;
Index
reskey
;
Oid
reskeyop
;
Oid
reskeyop
;
Index
resgroupref
;
Index
resgroupref
;
int
resjunk
;
bool
resjunk
;
}
Resdom
;
}
Resdom
;
/* -------------
/* -------------
...
...
src/include/parser/parse_target.h
View file @
585c9677
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: parse_target.h,v 1.1
1 1998/09/01 04:37:39
momjian Exp $
* $Id: parse_target.h,v 1.1
2 1999/05/17 17:03:46
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -29,13 +29,13 @@ extern TargetEntry *MakeTargetEntryIdent(ParseState *pstate,
...
@@ -29,13 +29,13 @@ extern TargetEntry *MakeTargetEntryIdent(ParseState *pstate,
char
**
resname
,
char
**
resname
,
char
*
refname
,
char
*
refname
,
char
*
colname
,
char
*
colname
,
int16
resjunk
);
bool
resjunk
);
extern
Node
*
CoerceTargetExpr
(
ParseState
*
pstate
,
Node
*
expr
,
extern
Node
*
CoerceTargetExpr
(
ParseState
*
pstate
,
Node
*
expr
,
Oid
type_id
,
Oid
attrtype
);
Oid
type_id
,
Oid
attrtype
);
TargetEntry
*
MakeTargetEntryExpr
(
ParseState
*
pstate
,
TargetEntry
*
MakeTargetEntryExpr
(
ParseState
*
pstate
,
char
*
colname
,
char
*
colname
,
Node
*
expr
,
Node
*
expr
,
List
*
arrayRef
,
List
*
arrayRef
,
int16
resjunk
);
bool
resjunk
);
#endif
/* PARSE_TARGET_H */
#endif
/* PARSE_TARGET_H */
src/man/explain.l
View file @
585c9677
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.1
1 1999/04/23 21:23:49
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.1
2 1999/05/17 17:03:51
momjian Exp $
.TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
.TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
.SH NAME
.SH NAME
explain - explains statement execution details
explain - explains statement execution details
...
@@ -33,12 +33,12 @@ NOTICE:QUERY PLAN:
...
@@ -33,12 +33,12 @@ NOTICE:QUERY PLAN:
{AGG :cost 0 :size 0 :width 0 :state <> :qptargetlist
{AGG :cost 0 :size 0 :width 0 :state <> :qptargetlist
({TLE :resdom {RESDOM :resno 1 :restype 700 :restypmod 4 :resname "sum"
({TLE :resdom {RESDOM :resno 1 :restype 700 :restypmod 4 :resname "sum"
:reskey 0 :reskeyop 0 :resjunk
0
}
:reskey 0 :reskeyop 0 :resjunk
false
}
:expr {AGGREG :aggname "sum" :basetype 700 :aggtype 700 :aggno 0
:expr {AGGREG :aggname "sum" :basetype 700 :aggtype 700 :aggno 0
:target {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}}})
:target {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}}})
:qpqual <> :lefttree {SEQSCAN :cost 0 :size 0 :width 4 :state <>
:qpqual <> :lefttree {SEQSCAN :cost 0 :size 0 :width 4 :state <>
:qptargetlist ({TLE :resdom {RESDOM :resno 1 :restype 700 :restypmod 4
:qptargetlist ({TLE :resdom {RESDOM :resno 1 :restype 700 :restypmod 4
:resname "null" :reskey 0 :reskeyop 0 :resjunk
0
}
:resname "null" :reskey 0 :reskeyop 0 :resjunk
false
}
:expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}})
:expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}})
:qpqual <> :lefttree <> :righttree <> :scanrelid 1} :righttree <> :numagg 1 }
:qpqual <> :lefttree <> :righttree <> :scanrelid 1} :righttree <> :numagg 1 }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment