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
d394d06d
Commit
d394d06d
authored
Aug 26, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix atttypmod alignment again, and re-enable ecpg.
parent
e2b09115
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
26 deletions
+43
-26
src/backend/commands/defind.c
src/backend/commands/defind.c
+20
-20
src/backend/parser/gram.c
src/backend/parser/gram.c
+1
-1
src/include/catalog/pg_attribute.h
src/include/catalog/pg_attribute.h
+2
-2
src/include/catalog/pg_attribute_check.sql
src/include/catalog/pg_attribute_check.sql
+17
-0
src/interfaces/Makefile
src/interfaces/Makefile
+2
-2
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+1
-1
No files found.
src/backend/commands/defind.c
View file @
d394d06d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.2
3 1998/08/26 05:22:36
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.2
4 1998/08/26 16:43:41
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -468,7 +468,7 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
...
@@ -468,7 +468,7 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
Oid
relId
)
Oid
relId
)
{
{
List
*
rest
;
List
*
rest
;
HeapTuple
tuple
;
HeapTuple
atttuple
,
tuple
;
/*
/*
* process attributeList
* process attributeList
...
@@ -484,20 +484,34 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
...
@@ -484,20 +484,34 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
if
(
attribute
->
name
==
NULL
)
if
(
attribute
->
name
==
NULL
)
elog
(
ERROR
,
"missing attribute for define index"
);
elog
(
ERROR
,
"missing attribute for define index"
);
tuple
=
SearchSysCacheTuple
(
ATTNAME
,
atttuple
=
SearchSysCacheTupleCopy
(
ATTNAME
,
ObjectIdGetDatum
(
relId
),
ObjectIdGetDatum
(
relId
),
PointerGetDatum
(
attribute
->
name
),
PointerGetDatum
(
attribute
->
name
),
0
,
0
);
0
,
0
);
if
(
!
HeapTupleIsValid
(
tuple
))
if
(
!
HeapTupleIsValid
(
att
tuple
))
{
{
elog
(
ERROR
,
elog
(
ERROR
,
"DefineIndex: attribute
\"
%s
\"
not found"
,
"DefineIndex: attribute
\"
%s
\"
not found"
,
attribute
->
name
);
attribute
->
name
);
}
}
attform
=
(
AttributeTupleForm
)
GETSTRUCT
(
tuple
);
attform
=
(
AttributeTupleForm
)
GETSTRUCT
(
att
tuple
);
*
attNumP
++
=
attform
->
attnum
;
*
attNumP
++
=
attform
->
attnum
;
/* we want the type so we can set the proper alignment, etc. */
if
(
attribute
->
typename
==
NULL
)
{
tuple
=
SearchSysCacheTuple
(
TYPOID
,
ObjectIdGetDatum
(
attform
->
atttypid
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
tuple
))
elog
(
ERROR
,
"create index: type for attribute '%s' undefined"
,
attribute
->
name
);
/* we just set the type name because that is all we need */
attribute
->
typename
=
makeNode
(
TypeName
);
attribute
->
typename
->
name
=
nameout
(
&
((
TypeTupleForm
)
GETSTRUCT
(
tuple
))
->
typname
);
}
if
(
attribute
->
class
==
NULL
)
if
(
attribute
->
class
==
NULL
)
{
{
/* no operator class specified, so find the default */
/* no operator class specified, so find the default */
...
@@ -520,21 +534,7 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
...
@@ -520,21 +534,7 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
attribute
->
class
);
attribute
->
class
);
}
}
*
classOidP
++
=
tuple
->
t_oid
;
*
classOidP
++
=
tuple
->
t_oid
;
/* we want the type so we can set the proper alignment, etc. */
pfree
(
atttuple
);
if
(
attribute
->
typename
==
NULL
)
{
Oid
typoid
=
((
Form_pg_opclass
)
GETSTRUCT
(
tuple
))
->
opcdeftype
;
tuple
=
SearchSysCacheTuple
(
TYPOID
,
ObjectIdGetDatum
(
typoid
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
tuple
))
elog
(
ERROR
,
"create index: type for class '%s' undefined"
,
attribute
->
class
);
/* we just set the name because that is all we need */
attribute
->
typename
=
makeNode
(
TypeName
);
attribute
->
typename
->
name
=
nameout
(
&
((
TypeTupleForm
)
GETSTRUCT
(
tuple
))
->
typname
);
}
}
}
}
}
...
...
src/backend/parser/gram.c
View file @
d394d06d
...
@@ -221,7 +221,7 @@
...
@@ -221,7 +221,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.3
0 1998/08/26 05:22
:43 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.3
1 1998/08/26 16:43
:43 momjian Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
...
src/include/catalog/pg_attribute.h
View file @
d394d06d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: pg_attribute.h,v 1.3
7 1998/08/26 05:51:24
momjian Exp $
* $Id: pg_attribute.h,v 1.3
8 1998/08/26 16:43:48
momjian Exp $
*
*
* NOTES
* NOTES
* the genbki.sh script reads this file and generates .bki
* the genbki.sh script reads this file and generates .bki
...
@@ -339,7 +339,7 @@ DATA(insert OID = 0 ( 1249 attlen 21 0 2 5 0 -1 -1 t f s f f));
...
@@ -339,7 +339,7 @@ DATA(insert OID = 0 ( 1249 attlen 21 0 2 5 0 -1 -1 t f s f f));
DATA
(
insert
OID
=
0
(
1249
attnum
21
0
2
6
0
-
1
-
1
t
f
s
f
f
));
DATA
(
insert
OID
=
0
(
1249
attnum
21
0
2
6
0
-
1
-
1
t
f
s
f
f
));
DATA
(
insert
OID
=
0
(
1249
attnelems
23
0
4
7
0
-
1
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
attnelems
23
0
4
7
0
-
1
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
attcacheoff
23
0
4
8
0
-
1
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
attcacheoff
23
0
4
8
0
-
1
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
atttypmod
2
1
0
4
9
0
-
1
-
1
t
f
s
f
f
));
DATA
(
insert
OID
=
0
(
1249
atttypmod
2
3
0
4
9
0
-
1
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1249
attbyval
16
0
1
10
0
-
1
-
1
t
f
c
f
f
));
DATA
(
insert
OID
=
0
(
1249
attbyval
16
0
1
10
0
-
1
-
1
t
f
c
f
f
));
DATA
(
insert
OID
=
0
(
1249
attisset
16
0
1
11
0
-
1
-
1
t
f
c
f
f
));
DATA
(
insert
OID
=
0
(
1249
attisset
16
0
1
11
0
-
1
-
1
t
f
c
f
f
));
DATA
(
insert
OID
=
0
(
1249
attalign
18
0
1
12
0
-
1
-
1
t
f
c
f
f
));
DATA
(
insert
OID
=
0
(
1249
attalign
18
0
1
12
0
-
1
-
1
t
f
c
f
f
));
...
...
src/include/catalog/pg_attribute_check.sql
0 → 100644
View file @
d394d06d
-- This makes sure the pg_attribute columns match the type's columns
-- bjm 1998/08/26
-- check lengths
SELECT
pg_attribute
.
oid
,
relname
,
attname
FROM
pg_class
,
pg_attribute
,
pg_type
WHERE
pg_class
.
oid
=
attrelid
AND
atttypid
=
pg_type
.
oid
AND
attlen
!=
typlen
;
-- check alignment
SELECT
pg_attribute
.
oid
,
relname
,
attname
FROM
pg_class
,
pg_attribute
,
pg_type
WHERE
pg_class
.
oid
=
attrelid
AND
atttypid
=
pg_type
.
oid
AND
attalign
!=
typalign
;
src/interfaces/Makefile
View file @
d394d06d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.1
4 1998/08/26 05:22:58
momjian Exp $
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.1
5 1998/08/26 16:43:51
momjian Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -23,7 +23,7 @@ endif
...
@@ -23,7 +23,7 @@ endif
.DEFAULT all install clean dep depend distclean
:
$(perl-makefile-dep)
.DEFAULT all install clean dep depend distclean
:
$(perl-makefile-dep)
$(MAKE)
-C
libpq
$@
$(MAKE)
-C
libpq
$@
#
$(MAKE) -C ecpg $@
$(MAKE)
-C
ecpg
$@
ifeq
($(HAVE_Cplusplus), true)
ifeq
($(HAVE_Cplusplus), true)
$(MAKE)
-C
libpq++
$@
$(MAKE)
-C
libpq++
$@
else
else
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
d394d06d
...
@@ -641,7 +641,7 @@ output_statement(char * stmt, int mode)
...
@@ -641,7 +641,7 @@ output_statement(char * stmt, int mode)
%type <str> join_using where_clause relation_expr row_op sub_type
%type <str> join_using where_clause relation_expr row_op sub_type
%type <str> opt_column_list insert_rest InsertStmt OptimizableStmt
%type <str> opt_column_list insert_rest InsertStmt OptimizableStmt
%type <str> columnList DeleteStmt LockStmt UpdateStmt CursorStmt
%type <str> columnList DeleteStmt LockStmt UpdateStmt CursorStmt
%type <str> NotifyStmt columnElem copy_dirn SubUnion c_expr
%type <str> NotifyStmt columnElem copy_dirn SubUnion c_expr
UnlistenStmt
%type <str> copy_delimiter ListenStmt CopyStmt copy_file_name opt_binary
%type <str> copy_delimiter ListenStmt CopyStmt copy_file_name opt_binary
%type <str> opt_with_copy FetchStmt opt_direction fetch_how_many opt_portal_name
%type <str> opt_with_copy FetchStmt opt_direction fetch_how_many opt_portal_name
%type <str> ClosePortalStmt DestroyStmt VacuumStmt opt_verbose
%type <str> ClosePortalStmt DestroyStmt VacuumStmt opt_verbose
...
...
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