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
a0402817
Commit
a0402817
authored
Jan 10, 2000
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move fixes for >8 indexed fields.
parent
b99f3006
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
268 additions
and
268 deletions
+268
-268
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+6
-6
src/backend/utils/adt/int.c
src/backend/utils/adt/int.c
+17
-20
src/bin/psql/describe.c
src/bin/psql/describe.c
+239
-239
src/include/config.h.in
src/include/config.h.in
+5
-0
src/include/postgres.h
src/include/postgres.h
+1
-3
No files found.
src/backend/parser/analyze.c
View file @
a0402817
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: analyze.c,v 1.12
7 2000/01/06 20:46:49 wieck
Exp $
* $Id: analyze.c,v 1.12
8 2000/01/10 05:20:21 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -674,7 +674,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
fkconstraint
=
(
FkConstraint
*
)
constraint
;
fkconstraint
->
fk_attrs
=
lappend
(
NIL
,
id
);
fkconstraints
=
lappend
(
fkconstraints
,
constraint
);
continue
;
}
...
...
@@ -960,7 +960,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
*/
if
(
fkconstraint
->
fk_attrs
!=
NIL
&&
fkconstraint
->
pk_attrs
==
NIL
)
transformFkeyGetPrimaryKey
(
fkconstraint
);
/*
* Build a CREATE CONSTRAINT TRIGGER statement for the CHECK
* action.
...
...
@@ -1016,7 +1016,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
extras_after
=
lappend
(
extras_after
,
(
Node
*
)
fk_trigger
);
/*
* Build a CREATE CONSTRAINT TRIGGER statement for the
* Build a CREATE CONSTRAINT TRIGGER statement for the
* ON DELETE action fired on the PK table !!!
*
*/
...
...
@@ -1084,7 +1084,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
extras_after
=
lappend
(
extras_after
,
(
Node
*
)
fk_trigger
);
/*
* Build a CREATE CONSTRAINT TRIGGER statement for the
* Build a CREATE CONSTRAINT TRIGGER statement for the
* ON UPDATE action fired on the PK table !!!
*
*/
...
...
@@ -1679,7 +1679,7 @@ transformFkeyGetPrimaryKey(FkConstraint *fkconstraint)
* using the attribute names of the PK relation descriptor
* ----------
*/
for
(
i
=
0
;
i
<
8
&&
indexStruct
->
indkey
[
i
]
!=
0
;
i
++
)
for
(
i
=
0
;
i
<
INDEX_MAX_KEYS
&&
indexStruct
->
indkey
[
i
]
!=
0
;
i
++
)
{
pkattno
=
indexStruct
->
indkey
[
i
];
pkattr
=
(
Ident
*
)
makeNode
(
Ident
);
...
...
src/backend/utils/adt/int.c
View file @
a0402817
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.2
7 1999/07/17 20:17:56
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.2
8 2000/01/10 05:20:23
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -76,29 +76,26 @@ int2out(int16 sh)
* Fills any nonexistent digits with NULLs.
*/
int16
*
int28in
(
char
*
shs
)
int28in
(
char
*
intString
)
{
int16
*
result
;
int
nums
;
int
slot
;
if
(
shs
==
NULL
)
if
(
intString
==
NULL
)
return
NULL
;
result
=
(
int16
*
)
palloc
(
sizeof
(
int16
[
8
]));
if
((
nums
=
sscanf
(
shs
,
"%hd%hd%hd%hd%hd%hd%hd%hd"
,
&
result
[
0
],
&
result
[
1
],
&
result
[
2
],
&
result
[
3
],
&
result
[
4
],
&
result
[
5
],
&
result
[
6
],
&
result
[
7
]))
!=
8
)
result
=
(
int16
*
)
palloc
(
sizeof
(
int16
[
INDEX_MAX_KEYS
]));
for
(
slot
=
0
;
*
intString
&&
slot
<
INDEX_MAX_KEYS
;
slot
++
)
{
do
result
[
nums
++
]
=
0
;
while
(
nums
<
8
);
if
(
sscanf
(
intString
,
"%hd"
,
&
result
[
slot
])
!=
1
)
break
;
while
(
*
intString
&&
*
intString
!=
' '
)
intString
++
;
}
while
(
slot
<
INDEX_MAX_KEYS
)
result
[
slot
++
]
=
0
;
return
result
;
}
...
...
@@ -120,10 +117,10 @@ int28out(int16 *shs)
result
[
1
]
=
'\0'
;
return
result
;
}
rp
=
result
=
(
char
*
)
palloc
(
8
*
7
);
/* assumes sign, 5 digits,
*
' ' */
rp
=
result
=
(
char
*
)
palloc
(
INDEX_MAX_KEYS
*
7
);
/* assumes sign, 5 digits,
' ' */
sp
=
shs
;
for
(
num
=
8
;
num
!=
0
;
num
--
)
for
(
num
=
INDEX_MAX_KEYS
;
num
!=
0
;
num
--
)
{
itoa
(
*
sp
++
,
rp
);
while
(
*++
rp
!=
'\0'
)
...
...
src/bin/psql/describe.c
View file @
a0402817
This diff is collapsed.
Click to expand it.
src/include/config.h.in
View file @
a0402817
...
...
@@ -92,6 +92,11 @@
*/
#define INDEXSCAN_PATCH
/*
* Maximum number of columns in an index.
*/
#define INDEX_MAX_KEYS 8
/*
* Enables debugging print statements in the date/time support routines.
* Particularly useful for porting to a new platform/OS combination.
...
...
src/include/postgres.h
View file @
a0402817
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1995, Regents of the University of California
*
* $Id: postgres.h,v 1.3
2 2000/01/10 04:36:3
6 momjian Exp $
* $Id: postgres.h,v 1.3
3 2000/01/10 05:20:2
6 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -101,8 +101,6 @@ struct varlena
typedef
struct
varlena
bytea
;
typedef
struct
varlena
text
;
#define INDEX_MAX_KEYS 8
/* maximum number of keys in an index
* definition */
typedef
int2
int28
[
INDEX_MAX_KEYS
];
typedef
Oid
oid8
[
INDEX_MAX_KEYS
];
...
...
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