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
d91baea0
Commit
d91baea0
authored
Aug 21, 1999
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ooops ... I had left some test coding in selfuncs.c that
failed on 'field < textconstant' ...
parent
ca5c10f7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/selfuncs.c
+16
-6
No files found.
src/backend/utils/adt/selfuncs.c
View file @
d91baea0
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.3
8 1999/08/09 03:16:45
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.3
9 1999/08/21 00:56:18
tgl Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "parser/parse_func.h"
#include "parser/parse_func.h"
#include "parser/parse_oper.h"
#include "parser/parse_oper.h"
#include "utils/builtins.h"
#include "utils/builtins.h"
#include "utils/int8.h"
#include "utils/lsyscache.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "utils/syscache.h"
...
@@ -460,22 +461,31 @@ convert_to_scale(Datum value, Oid typid,
...
@@ -460,22 +461,31 @@ convert_to_scale(Datum value, Oid typid,
case
INT4OID
:
case
INT4OID
:
*
scaleval
=
(
double
)
DatumGetInt32
(
value
);
*
scaleval
=
(
double
)
DatumGetInt32
(
value
);
return
true
;
return
true
;
//
case INT8OID:
case
INT8OID
:
*
scaleval
=
(
double
)
(
*
i8tod
((
int64
*
)
DatumGetPointer
(
value
)));
return
true
;
case
FLOAT4OID
:
case
FLOAT4OID
:
*
scaleval
=
(
double
)
(
*
DatumGetFloat32
(
value
));
*
scaleval
=
(
double
)
(
*
DatumGetFloat32
(
value
));
return
true
;
return
true
;
case
FLOAT8OID
:
case
FLOAT8OID
:
*
scaleval
=
(
double
)
(
*
DatumGetFloat64
(
value
));
*
scaleval
=
(
double
)
(
*
DatumGetFloat64
(
value
));
return
true
;
return
true
;
// case NUMERICOID:
case
NUMERICOID
:
*
scaleval
=
(
double
)
(
*
numeric_float8
((
Numeric
)
DatumGetPointer
(
value
)));
return
true
;
case
OIDOID
:
case
OIDOID
:
case
REGPROCOID
:
case
REGPROCOID
:
/* we can treat OIDs as integers... */
/* we can treat OIDs as integers... */
*
scaleval
=
(
double
)
DatumGetObjectId
(
value
);
*
scaleval
=
(
double
)
DatumGetObjectId
(
value
);
return
true
;
return
true
;
case
TEXTOID
:
/*
* Eventually this should get handled by somehow scaling as a
* string value. For now, we need to call it out to avoid
* falling into the default case, because there is a float8(text)
* function declared in pg_proc that will do the wrong thing :-(
*/
break
;
default:
default:
{
{
/* See whether there is a registered type-conversion function,
/* See whether there is a registered type-conversion 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