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
783fbdab
Commit
783fbdab
authored
May 14, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove columns pg_index.haskeytype and pg_index.indisclustered. Not used.
parent
c87bc779
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
45 deletions
+15
-45
src/backend/access/gist/gist.c
src/backend/access/gist/gist.c
+1
-2
src/backend/catalog/index.c
src/backend/catalog/index.c
+1
-3
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relcache.c
+1
-2
src/include/catalog/catversion.h
src/include/catalog/catversion.h
+2
-2
src/include/catalog/pg_index.h
src/include/catalog/pg_index.h
+7
-10
src/interfaces/odbc/info.c
src/interfaces/odbc/info.c
+3
-26
No files found.
src/backend/access/gist/gist.c
View file @
783fbdab
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.7
3 2001/05/07 00:43:15 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.7
4 2001/05/14 21:53:16 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1127,7 +1127,6 @@ initGISTstate(GISTSTATE *giststate, Relation index)
...
@@ -1127,7 +1127,6 @@ initGISTstate(GISTSTATE *giststate, Relation index)
elog
(
ERROR
,
"initGISTstate: index %u not found"
,
elog
(
ERROR
,
"initGISTstate: index %u not found"
,
RelationGetRelid
(
index
));
RelationGetRelid
(
index
));
itupform
=
(
Form_pg_index
)
GETSTRUCT
(
htup
);
itupform
=
(
Form_pg_index
)
GETSTRUCT
(
htup
);
giststate
->
haskeytype
=
itupform
->
indhaskeytype
;
indexrelid
=
itupform
->
indexrelid
;
indexrelid
=
itupform
->
indexrelid
;
ReleaseSysCache
(
htup
);
ReleaseSysCache
(
htup
);
...
...
src/backend/catalog/index.c
View file @
783fbdab
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.14
6 2001/05/07 00:43:17 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.14
7 2001/05/14 21:53:16 momjian
Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -587,9 +587,7 @@ UpdateIndexRelation(Oid indexoid,
...
@@ -587,9 +587,7 @@ UpdateIndexRelation(Oid indexoid,
indexForm
->
indexrelid
=
indexoid
;
indexForm
->
indexrelid
=
indexoid
;
indexForm
->
indrelid
=
heapoid
;
indexForm
->
indrelid
=
heapoid
;
indexForm
->
indproc
=
indexInfo
->
ii_FuncOid
;
indexForm
->
indproc
=
indexInfo
->
ii_FuncOid
;
indexForm
->
indisclustered
=
false
;
indexForm
->
indislossy
=
islossy
;
indexForm
->
indislossy
=
islossy
;
indexForm
->
indhaskeytype
=
true
;
/* not actually used anymore */
indexForm
->
indisunique
=
indexInfo
->
ii_Unique
;
indexForm
->
indisunique
=
indexInfo
->
ii_Unique
;
indexForm
->
indisprimary
=
primary
;
indexForm
->
indisprimary
=
primary
;
memcpy
((
char
*
)
&
indexForm
->
indpred
,
(
char
*
)
predText
,
predLen
);
memcpy
((
char
*
)
&
indexForm
->
indpred
,
(
char
*
)
predText
,
predLen
);
...
...
src/backend/utils/cache/relcache.c
View file @
783fbdab
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.13
2 2001/05/14 20:30:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.13
3 2001/05/14 21:53:16
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -70,7 +70,6 @@ static FormData_pg_attribute Desc_pg_class[Natts_pg_class] = {Schema_pg_class};
...
@@ -70,7 +70,6 @@ static FormData_pg_attribute Desc_pg_class[Natts_pg_class] = {Schema_pg_class};
static
FormData_pg_attribute
Desc_pg_attribute
[
Natts_pg_attribute
]
=
{
Schema_pg_attribute
};
static
FormData_pg_attribute
Desc_pg_attribute
[
Natts_pg_attribute
]
=
{
Schema_pg_attribute
};
static
FormData_pg_attribute
Desc_pg_proc
[
Natts_pg_proc
]
=
{
Schema_pg_proc
};
static
FormData_pg_attribute
Desc_pg_proc
[
Natts_pg_proc
]
=
{
Schema_pg_proc
};
static
FormData_pg_attribute
Desc_pg_type
[
Natts_pg_type
]
=
{
Schema_pg_type
};
static
FormData_pg_attribute
Desc_pg_type
[
Natts_pg_type
]
=
{
Schema_pg_type
};
static
FormData_pg_attribute
Desc_pg_variable
[
Natts_pg_variable
]
=
{
Schema_pg_variable
};
static
FormData_pg_attribute
Desc_pg_log
[
Natts_pg_log
]
=
{
Schema_pg_log
};
static
FormData_pg_attribute
Desc_pg_log
[
Natts_pg_log
]
=
{
Schema_pg_log
};
/*
/*
...
...
src/include/catalog/catversion.h
View file @
783fbdab
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Id: catversion.h,v 1.7
3 2001/05/14 20:30:21
momjian Exp $
* $Id: catversion.h,v 1.7
4 2001/05/14 21:53:16
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -53,6 +53,6 @@
...
@@ -53,6 +53,6 @@
*/
*/
/* yyyymmddN */
/* yyyymmddN */
#define CATALOG_VERSION_NO 200105140
1
#define CATALOG_VERSION_NO 200105140
2
#endif
#endif
src/include/catalog/pg_index.h
View file @
783fbdab
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Id: pg_index.h,v 1.1
6 2001/01/24 19:43:21
momjian Exp $
* $Id: pg_index.h,v 1.1
7 2001/05/14 21:53:16
momjian Exp $
*
*
* NOTES
* NOTES
* the genbki.sh script reads this file and generates .bki
* the genbki.sh script reads this file and generates .bki
...
@@ -48,7 +48,6 @@ CATALOG(pg_index)
...
@@ -48,7 +48,6 @@ CATALOG(pg_index)
* index */
* index */
int2vector
indkey
;
int2vector
indkey
;
oidvector
indclass
;
oidvector
indclass
;
bool
indisclustered
;
bool
indislossy
;
/* do we fetch false tuples (lossy
bool
indislossy
;
/* do we fetch false tuples (lossy
* compression)? */
* compression)? */
bool
indhaskeytype
;
/* does key type != attribute type? */
bool
indhaskeytype
;
/* does key type != attribute type? */
...
@@ -70,18 +69,16 @@ typedef FormData_pg_index *Form_pg_index;
...
@@ -70,18 +69,16 @@ typedef FormData_pg_index *Form_pg_index;
* compiler constants for pg_index
* compiler constants for pg_index
* ----------------
* ----------------
*/
*/
#define Natts_pg_index 1
2
#define Natts_pg_index 1
0
#define Anum_pg_index_indexrelid 1
#define Anum_pg_index_indexrelid 1
#define Anum_pg_index_indrelid 2
#define Anum_pg_index_indrelid 2
#define Anum_pg_index_indproc 3
#define Anum_pg_index_indproc 3
#define Anum_pg_index_indkey 4
#define Anum_pg_index_indkey 4
#define Anum_pg_index_indclass 5
#define Anum_pg_index_indclass 5
#define Anum_pg_index_indisclustered 6
#define Anum_pg_index_indislossy 6
#define Anum_pg_index_indislossy 7
#define Anum_pg_index_indisunique 7
#define Anum_pg_index_indhaskeytype 8
#define Anum_pg_index_indisprimary 8
#define Anum_pg_index_indisunique 9
#define Anum_pg_index_indreference 9
#define Anum_pg_index_indisprimary 10
#define Anum_pg_index_indpred 10
#define Anum_pg_index_indreference 11
#define Anum_pg_index_indpred 12
#endif
/* PG_INDEX_H */
#endif
/* PG_INDEX_H */
src/interfaces/odbc/info.c
View file @
783fbdab
...
@@ -2009,8 +2009,7 @@ SQLStatistics(
...
@@ -2009,8 +2009,7 @@ SQLStatistics(
char
*
table_name
;
char
*
table_name
;
char
index_name
[
MAX_INFO_STRING
];
char
index_name
[
MAX_INFO_STRING
];
short
fields_vector
[
16
];
short
fields_vector
[
16
];
char
isunique
[
10
],
char
isunique
[
10
];
isclustered
[
10
];
SDWORD
index_name_len
,
SDWORD
index_name_len
,
fields_vector_len
;
fields_vector_len
;
TupleNode
*
row
;
TupleNode
*
row
;
...
@@ -2170,7 +2169,7 @@ SQLStatistics(
...
@@ -2170,7 +2169,7 @@ SQLStatistics(
indx_stmt
=
(
StatementClass
*
)
hindx_stmt
;
indx_stmt
=
(
StatementClass
*
)
hindx_stmt
;
sprintf
(
index_query
,
"select c.relname, i.indkey, i.indisunique"
sprintf
(
index_query
,
"select c.relname, i.indkey, i.indisunique"
",
i.indisclustered,
c.relhasrules"
", c.relhasrules"
" from pg_index i, pg_class c, pg_class d"
" from pg_index i, pg_class c, pg_class d"
" where c.oid = i.indexrelid and d.relname = '%s'"
" where c.oid = i.indexrelid and d.relname = '%s'"
" and d.oid = i.indrelid"
,
table_name
);
" and d.oid = i.indrelid"
,
table_name
);
...
@@ -2178,7 +2177,6 @@ SQLStatistics(
...
@@ -2178,7 +2177,6 @@ SQLStatistics(
result
=
SQLExecDirect
(
hindx_stmt
,
index_query
,
strlen
(
index_query
));
result
=
SQLExecDirect
(
hindx_stmt
,
index_query
,
strlen
(
index_query
));
if
((
result
!=
SQL_SUCCESS
)
&&
(
result
!=
SQL_SUCCESS_WITH_INFO
))
if
((
result
!=
SQL_SUCCESS
)
&&
(
result
!=
SQL_SUCCESS_WITH_INFO
))
{
{
/*
/*
* "Couldn't execute index query (w/SQLExecDirect) in
* "Couldn't execute index query (w/SQLExecDirect) in
* SQLStatistics.";
* SQLStatistics.";
...
@@ -2226,20 +2224,7 @@ SQLStatistics(
...
@@ -2226,20 +2224,7 @@ SQLStatistics(
goto
SEEYA
;
goto
SEEYA
;
}
}
/* bind the "is clustered" column */
result
=
SQLBindCol
(
hindx_stmt
,
4
,
SQL_C_CHAR
,
result
=
SQLBindCol
(
hindx_stmt
,
4
,
SQL_C_CHAR
,
isclustered
,
sizeof
(
isclustered
),
NULL
);
if
((
result
!=
SQL_SUCCESS
)
&&
(
result
!=
SQL_SUCCESS_WITH_INFO
))
{
stmt
->
errormsg
=
indx_stmt
->
errormsg
;
/* "Couldn't bind column
* in SQLStatistics."; */
stmt
->
errornumber
=
indx_stmt
->
errornumber
;
SQLFreeStmt
(
hindx_stmt
,
SQL_DROP
);
goto
SEEYA
;
}
result
=
SQLBindCol
(
hindx_stmt
,
5
,
SQL_C_CHAR
,
relhasrules
,
MAX_INFO_STRING
,
NULL
);
relhasrules
,
MAX_INFO_STRING
,
NULL
);
if
((
result
!=
SQL_SUCCESS
)
&&
(
result
!=
SQL_SUCCESS_WITH_INFO
))
if
((
result
!=
SQL_SUCCESS
)
&&
(
result
!=
SQL_SUCCESS_WITH_INFO
))
{
{
...
@@ -2270,10 +2255,6 @@ SQLStatistics(
...
@@ -2270,10 +2255,6 @@ SQLStatistics(
sprintf
(
buf
,
"%s_idx_fake_oid"
,
table_name
);
sprintf
(
buf
,
"%s_idx_fake_oid"
,
table_name
);
set_tuplefield_string
(
&
row
->
tuple
[
5
],
buf
);
set_tuplefield_string
(
&
row
->
tuple
[
5
],
buf
);
/*
* Clustered index? I think non-clustered should be type OTHER
* not HASHED
*/
set_tuplefield_int2
(
&
row
->
tuple
[
6
],
(
Int2
)
SQL_INDEX_OTHER
);
set_tuplefield_int2
(
&
row
->
tuple
[
6
],
(
Int2
)
SQL_INDEX_OTHER
);
set_tuplefield_int2
(
&
row
->
tuple
[
7
],
(
Int2
)
1
);
set_tuplefield_int2
(
&
row
->
tuple
[
7
],
(
Int2
)
1
);
...
@@ -2316,11 +2297,7 @@ SQLStatistics(
...
@@ -2316,11 +2297,7 @@ SQLStatistics(
set_tuplefield_string
(
&
row
->
tuple
[
4
],
""
);
set_tuplefield_string
(
&
row
->
tuple
[
4
],
""
);
set_tuplefield_string
(
&
row
->
tuple
[
5
],
index_name
);
set_tuplefield_string
(
&
row
->
tuple
[
5
],
index_name
);
/*
set_tuplefield_int2
(
&
row
->
tuple
[
6
],
(
Int2
)
SQL_INDEX_OTHER
);
* Clustered index? I think non-clustered should be type
* OTHER not HASHED
*/
set_tuplefield_int2
(
&
row
->
tuple
[
6
],
(
Int2
)
(
atoi
(
isclustered
)
?
SQL_INDEX_CLUSTERED
:
SQL_INDEX_OTHER
));
set_tuplefield_int2
(
&
row
->
tuple
[
7
],
(
Int2
)
(
i
+
1
));
set_tuplefield_int2
(
&
row
->
tuple
[
7
],
(
Int2
)
(
i
+
1
));
if
(
fields_vector
[
i
]
==
OID_ATTNUM
)
if
(
fields_vector
[
i
]
==
OID_ATTNUM
)
...
...
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