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
81ced1e0
Commit
81ced1e0
authored
May 31, 1999
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate a more specific error message when an operator used
in an index doesn't have a restriction selectivity estimator.
parent
cc384fa2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
5 deletions
+61
-5
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/selfuncs.c
+61
-5
No files found.
src/backend/utils/adt/selfuncs.c
View file @
81ced1e0
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.2
8 1999/05/25 16:12:20 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.2
9 1999/05/31 19:32:47 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -404,7 +404,21 @@ btreesel(Oid operatorObjectId,
}
else
{
result
=
(
float64
)
fmgr
(
get_oprrest
(
operatorObjectId
),
RegProcedure
oprrest
=
get_oprrest
(
operatorObjectId
);
/*
* Operators used for indexes should have selectivity estimators.
* (An alternative is to default to 0.5, as the optimizer does in
* dealing with operators occurring in WHERE clauses, but if you
* are going to the trouble of making index support you probably
* don't want to miss the benefits of a good selectivity estimate.)
*/
if
(
!
oprrest
)
elog
(
ERROR
,
"Operator %u must have a restriction selectivity estimator to be used in a btree index"
,
operatorObjectId
);
result
=
(
float64
)
fmgr
(
oprrest
,
(
char
*
)
operatorObjectId
,
(
char
*
)
indrelid
,
(
char
*
)
(
int
)
attributeNumber
,
...
...
@@ -449,7 +463,21 @@ btreenpage(Oid operatorObjectId,
}
else
{
temp
=
(
float64
)
fmgr
(
get_oprrest
(
operatorObjectId
),
RegProcedure
oprrest
=
get_oprrest
(
operatorObjectId
);
/*
* Operators used for indexes should have selectivity estimators.
* (An alternative is to default to 0.5, as the optimizer does in
* dealing with operators occurring in WHERE clauses, but if you
* are going to the trouble of making index support you probably
* don't want to miss the benefits of a good selectivity estimate.)
*/
if
(
!
oprrest
)
elog
(
ERROR
,
"Operator %u must have a restriction selectivity estimator to be used in a btree index"
,
operatorObjectId
);
temp
=
(
float64
)
fmgr
(
oprrest
,
(
char
*
)
operatorObjectId
,
(
char
*
)
indrelid
,
(
char
*
)
(
int
)
attributeNumber
,
...
...
@@ -514,7 +542,21 @@ hashsel(Oid operatorObjectId,
}
else
{
result
=
(
float64
)
fmgr
(
get_oprrest
(
operatorObjectId
),
RegProcedure
oprrest
=
get_oprrest
(
operatorObjectId
);
/*
* Operators used for indexes should have selectivity estimators.
* (An alternative is to default to 0.5, as the optimizer does in
* dealing with operators occurring in WHERE clauses, but if you
* are going to the trouble of making index support you probably
* don't want to miss the benefits of a good selectivity estimate.)
*/
if
(
!
oprrest
)
elog
(
ERROR
,
"Operator %u must have a restriction selectivity estimator to be used in a hash index"
,
operatorObjectId
);
result
=
(
float64
)
fmgr
(
oprrest
,
(
char
*
)
operatorObjectId
,
(
char
*
)
indrelid
,
(
char
*
)
(
int
)
attributeNumber
,
...
...
@@ -578,7 +620,21 @@ hashnpage(Oid operatorObjectId,
}
else
{
temp
=
(
float64
)
fmgr
(
get_oprrest
(
operatorObjectId
),
RegProcedure
oprrest
=
get_oprrest
(
operatorObjectId
);
/*
* Operators used for indexes should have selectivity estimators.
* (An alternative is to default to 0.5, as the optimizer does in
* dealing with operators occurring in WHERE clauses, but if you
* are going to the trouble of making index support you probably
* don't want to miss the benefits of a good selectivity estimate.)
*/
if
(
!
oprrest
)
elog
(
ERROR
,
"Operator %u must have a restriction selectivity estimator to be used in a hash index"
,
operatorObjectId
);
temp
=
(
float64
)
fmgr
(
oprrest
,
(
char
*
)
operatorObjectId
,
(
char
*
)
indrelid
,
(
char
*
)
(
int
)
attributeNumber
,
...
...
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