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
0da6cf54
Commit
0da6cf54
authored
Aug 31, 2002
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The UNDEFOID later causes an assertion failure in heap_formtuple when
you try to use the tupdesc to build a tuple. Joe Conway
parent
1bab464e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
47 deletions
+47
-47
src/backend/executor/execQual.c
src/backend/executor/execQual.c
+45
-46
src/backend/executor/nodeFunctionscan.c
src/backend/executor/nodeFunctionscan.c
+2
-1
No files found.
src/backend/executor/execQual.c
View file @
0da6cf54
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.10
3 2002/08/30 23:59:46
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.10
4 2002/08/31 19:09:27
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -69,8 +69,9 @@ static Datum ExecEvalNullTest(NullTest *ntest, ExprContext *econtext,
bool
*
isNull
,
ExprDoneCond
*
isDone
);
static
Datum
ExecEvalBooleanTest
(
BooleanTest
*
btest
,
ExprContext
*
econtext
,
bool
*
isNull
,
ExprDoneCond
*
isDone
);
static
Datum
ExecEvalConstraint
(
Constraint
*
constraint
,
ExprContext
*
econtext
,
bool
*
isNull
,
ExprDoneCond
*
isDone
);
static
Datum
ExecEvalConstraintTest
(
ConstraintTest
*
constraint
,
ExprContext
*
econtext
,
bool
*
isNull
,
ExprDoneCond
*
isDone
);
/*----------
...
...
@@ -1465,43 +1466,6 @@ ExecEvalNullTest(NullTest *ntest,
}
}
/*
* ExecEvalConstraint
*
* Test the constraint against the data provided. If the data fits
* within the constraint specifications, pass it through (return the
* datum) otherwise throw an error.
*/
static
Datum
ExecEvalConstraint
(
Constraint
*
constraint
,
ExprContext
*
econtext
,
bool
*
isNull
,
ExprDoneCond
*
isDone
)
{
Datum
result
;
result
=
ExecEvalExpr
(
constraint
->
raw_expr
,
econtext
,
isNull
,
isDone
);
/* Test for the constraint type */
switch
(
constraint
->
contype
)
{
case
CONSTR_NOTNULL
:
if
(
*
isNull
)
{
elog
(
ERROR
,
"Domain %s does not allow NULL values"
,
constraint
->
name
);
}
break
;
case
CONSTR_CHECK
:
elog
(
ERROR
,
"ExecEvalConstraint: Domain CHECK Constraints not yet implemented"
);
break
;
default:
elog
(
ERROR
,
"ExecEvalConstraint: Constraint type unknown"
);
break
;
}
/* If all has gone well (constraint did not fail) return the datum */
return
result
;
}
/* ----------------------------------------------------------------
* ExecEvalBooleanTest
*
...
...
@@ -1582,6 +1546,41 @@ ExecEvalBooleanTest(BooleanTest *btest,
}
}
/*
* ExecEvalConstraintTest
*
* Test the constraint against the data provided. If the data fits
* within the constraint specifications, pass it through (return the
* datum) otherwise throw an error.
*/
static
Datum
ExecEvalConstraintTest
(
ConstraintTest
*
constraint
,
ExprContext
*
econtext
,
bool
*
isNull
,
ExprDoneCond
*
isDone
)
{
Datum
result
;
result
=
ExecEvalExpr
(
constraint
->
arg
,
econtext
,
isNull
,
isDone
);
switch
(
constraint
->
testtype
)
{
case
CONSTR_TEST_NOTNULL
:
if
(
*
isNull
)
elog
(
ERROR
,
"Domain %s does not allow NULL values"
,
constraint
->
name
);
break
;
case
CONSTR_TEST_CHECK
:
/* TODO: Add CHECK Constraints to domains */
elog
(
ERROR
,
"Domain CHECK Constraints not yet implemented"
);
break
;
default:
elog
(
ERROR
,
"ExecEvalConstraintTest: Constraint type unknown"
);
break
;
}
/* If all has gone well (constraint did not fail) return the datum */
return
result
;
}
/* ----------------------------------------------------------------
* ExecEvalFieldSelect
*
...
...
@@ -1749,12 +1748,6 @@ ExecEvalExpr(Node *expression,
isNull
,
isDone
);
break
;
case
T_Constraint
:
retDatum
=
ExecEvalConstraint
((
Constraint
*
)
expression
,
econtext
,
isNull
,
isDone
);
break
;
case
T_CaseExpr
:
retDatum
=
ExecEvalCase
((
CaseExpr
*
)
expression
,
econtext
,
...
...
@@ -1773,6 +1766,12 @@ ExecEvalExpr(Node *expression,
isNull
,
isDone
);
break
;
case
T_ConstraintTest
:
retDatum
=
ExecEvalConstraintTest
((
ConstraintTest
*
)
expression
,
econtext
,
isNull
,
isDone
);
break
;
default:
elog
(
ERROR
,
"ExecEvalExpr: unknown expression type %d"
,
...
...
src/backend/executor/nodeFunctionscan.c
View file @
0da6cf54
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v 1.
9 2002/08/30 23:59:46
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v 1.
10 2002/08/31 19:09:27
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -226,6 +226,7 @@ ExecInitFunctionScan(FunctionScan *node, EState *estate, Plan *parent)
List
*
coldeflist
=
rte
->
coldeflist
;
tupdesc
=
BuildDescForRelation
(
coldeflist
);
tupdesc
->
tdhasoid
=
WITHOUTOID
;
}
else
elog
(
ERROR
,
"Unknown kind of return type specified for function"
);
...
...
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