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
78511d8f
Commit
78511d8f
authored
Feb 09, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimizer fix for samekeys.
parent
fe35ffe7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5291 additions
and
5079 deletions
+5291
-5079
src/backend/optimizer/util/keys.c
src/backend/optimizer/util/keys.c
+16
-6
src/backend/parser/gram.c
src/backend/parser/gram.c
+5225
-5025
src/backend/parser/parse.h
src/backend/parser/parse.h
+50
-48
No files found.
src/backend/optimizer/util/keys.c
View file @
78511d8f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.1
1 1999/02/09 03:51:26
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.1
2 1999/02/09 06:30:39
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -108,25 +108,35 @@ extract_subkey(JoinKey *jk, int which_subkey)
/*
* samekeys--
* Returns t iff two sets of path keys are equivalent. They are
* equivalent if the first subkey (var node) within each sublist of
* list 'keys1' is contained within the corresponding sublist of 'keys2'.
* equivalent if the first Var nodes match the second Var nodes.
*
* XXX It isn't necessary to check that each sublist exactly contain
* the same elements because if the routine that built these
* sublists together is correct, having one element in common
* implies having all elements in common.
* Huh? bjm
*
*/
bool
samekeys
(
List
*
keys1
,
List
*
keys2
)
{
List
*
key1
,
*
key2
;
*
key2
,
*
key1a
,
*
key2a
;
for
(
key1
=
keys1
,
key2
=
keys2
;
key1
!=
NIL
&&
key2
!=
NIL
;
for
(
key1
=
keys1
,
key2
=
keys2
;
key1
!=
NIL
&&
key2
!=
NIL
;
key1
=
lnext
(
key1
),
key2
=
lnext
(
key2
))
if
(
!
member
(
lfirst
((
List
*
)
lfirst
(
key1
)),
lfirst
(
key2
)))
{
for
(
key1a
=
lfirst
(
key1
),
key2a
=
lfirst
(
key2
);
key1a
!=
NIL
&&
key2a
!=
NIL
;
key1a
=
lnext
(
key1a
),
key2a
=
lnext
(
key2a
))
if
(
!
equal
(
lfirst
(
key1a
),
lfirst
(
key2a
)))
return
false
;
if
(
key1a
!=
NIL
)
return
false
;
}
/* Now the result should be true if list keys2 has at least as many
* entries as keys1, ie, we did not fall off the end of keys2 first.
...
...
src/backend/parser/gram.c
View file @
78511d8f
This diff is collapsed.
Click to expand it.
src/backend/parser/parse.h
View file @
78511d8f
...
...
@@ -202,54 +202,56 @@ typedef union
#define INSTEAD 428
#define ISNULL 429
#define LANCOMPILER 430
#define LISTEN 431
#define LOAD 432
#define LOCATION 433
#define LOCK_P 434
#define MAXVALUE 435
#define MINVALUE 436
#define MOVE 437
#define NEW 438
#define NOCREATEDB 439
#define NOCREATEUSER 440
#define NONE 441
#define NOTHING 442
#define NOTIFY 443
#define NOTNULL 444
#define OIDS 445
#define OPERATOR 446
#define PASSWORD 447
#define PROCEDURAL 448
#define RECIPE 449
#define RENAME 450
#define RESET 451
#define RETURNS 452
#define ROW 453
#define RULE 454
#define SEQUENCE 455
#define SERIAL 456
#define SETOF 457
#define SHOW 458
#define START 459
#define STATEMENT 460
#define STDIN 461
#define STDOUT 462
#define TRUSTED 463
#define UNLISTEN 464
#define UNTIL 465
#define VACUUM 466
#define VALID 467
#define VERBOSE 468
#define VERSION 469
#define IDENT 470
#define SCONST 471
#define Op 472
#define ICONST 473
#define PARAM 474
#define FCONST 475
#define OP 476
#define UMINUS 477
#define TYPECAST 478
#define LIMIT 431
#define LISTEN 432
#define LOAD 433
#define LOCATION 434
#define LOCK_P 435
#define MAXVALUE 436
#define MINVALUE 437
#define MOVE 438
#define NEW 439
#define NOCREATEDB 440
#define NOCREATEUSER 441
#define NONE 442
#define NOTHING 443
#define NOTIFY 444
#define NOTNULL 445
#define OFFSET 446
#define OIDS 447
#define OPERATOR 448
#define PASSWORD 449
#define PROCEDURAL 450
#define RECIPE 451
#define RENAME 452
#define RESET 453
#define RETURNS 454
#define ROW 455
#define RULE 456
#define SEQUENCE 457
#define SERIAL 458
#define SETOF 459
#define SHOW 460
#define START 461
#define STATEMENT 462
#define STDIN 463
#define STDOUT 464
#define TRUSTED 465
#define UNLISTEN 466
#define UNTIL 467
#define VACUUM 468
#define VALID 469
#define VERBOSE 470
#define VERSION 471
#define IDENT 472
#define SCONST 473
#define Op 474
#define ICONST 475
#define PARAM 476
#define FCONST 477
#define OP 478
#define UMINUS 479
#define TYPECAST 480
extern
YYSTYPE
yylval
;
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