mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Add a few type conversion functions.
Pass an additional argument for date/time formatting to better handle timezones.
This commit is contained in:
parent
64d9b50893
commit
407cd4ee24
@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: builtins.h,v 1.16 1997/04/27 19:24:13 thomas Exp $
|
||||
* $Id: builtins.h,v 1.17 1997/05/11 15:13:47 thomas Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This should normally only be included by fmgr.h.
|
||||
@ -290,20 +290,28 @@ extern float64 float8mi(float64 arg1, float64 arg2);
|
||||
extern float64 float8mul(float64 arg1, float64 arg2);
|
||||
extern float64 float8div(float64 arg1, float64 arg2);
|
||||
extern float64 float8inc(float64 arg1);
|
||||
extern long float4eq(float32 arg1, float32 arg2);
|
||||
extern long float4ne(float32 arg1, float32 arg2);
|
||||
extern long float4lt(float32 arg1, float32 arg2);
|
||||
extern long float4le(float32 arg1, float32 arg2);
|
||||
extern long float4gt(float32 arg1, float32 arg2);
|
||||
extern long float4ge(float32 arg1, float32 arg2);
|
||||
extern long float8eq(float64 arg1, float64 arg2);
|
||||
extern long float8ne(float64 arg1, float64 arg2);
|
||||
extern long float8lt(float64 arg1, float64 arg2);
|
||||
extern long float8le(float64 arg1, float64 arg2);
|
||||
extern long float8gt(float64 arg1, float64 arg2);
|
||||
extern long float8ge(float64 arg1, float64 arg2);
|
||||
extern bool float4eq(float32 arg1, float32 arg2);
|
||||
extern bool float4ne(float32 arg1, float32 arg2);
|
||||
extern bool float4lt(float32 arg1, float32 arg2);
|
||||
extern bool float4le(float32 arg1, float32 arg2);
|
||||
extern bool float4gt(float32 arg1, float32 arg2);
|
||||
extern bool float4ge(float32 arg1, float32 arg2);
|
||||
extern bool float8eq(float64 arg1, float64 arg2);
|
||||
extern bool float8ne(float64 arg1, float64 arg2);
|
||||
extern bool float8lt(float64 arg1, float64 arg2);
|
||||
extern bool float8le(float64 arg1, float64 arg2);
|
||||
extern bool float8gt(float64 arg1, float64 arg2);
|
||||
extern bool float8ge(float64 arg1, float64 arg2);
|
||||
extern float64 ftod(float32 num);
|
||||
extern float64 itod(int32 num);
|
||||
extern float64 i2tod(int16 num);
|
||||
extern float32 dtof(float64 num);
|
||||
extern int32 dtoi(float64 num);
|
||||
extern int16 dtoi2(float64 num);
|
||||
extern float32 itof(int32 num);
|
||||
extern float32 i2tof(int16 num);
|
||||
extern int32 ftoi(float32 num);
|
||||
extern int16 ftoi2(float32 num);
|
||||
extern float64 dround(float64 arg1);
|
||||
extern float64 dtrunc(float64 arg1);
|
||||
extern float64 dsqrt(float64 arg1);
|
||||
@ -319,18 +327,18 @@ extern float64 float84pl(float64 arg1, float32 arg2);
|
||||
extern float64 float84mi(float64 arg1, float32 arg2);
|
||||
extern float64 float84mul(float64 arg1, float32 arg2);
|
||||
extern float64 float84div(float64 arg1, float32 arg2);
|
||||
extern long float48eq(float32 arg1, float64 arg2);
|
||||
extern long float48ne(float32 arg1, float64 arg2);
|
||||
extern long float48lt(float32 arg1, float64 arg2);
|
||||
extern long float48le(float32 arg1, float64 arg2);
|
||||
extern long float48gt(float32 arg1, float64 arg2);
|
||||
extern long float48ge(float32 arg1, float64 arg2);
|
||||
extern long float84eq(float64 arg1, float32 arg2);
|
||||
extern long float84ne(float64 arg1, float32 arg2);
|
||||
extern long float84lt(float64 arg1, float32 arg2);
|
||||
extern long float84le(float64 arg1, float32 arg2);
|
||||
extern long float84gt(float64 arg1, float32 arg2);
|
||||
extern long float84ge(float64 arg1, float32 arg2);
|
||||
extern bool float48eq(float32 arg1, float64 arg2);
|
||||
extern bool float48ne(float32 arg1, float64 arg2);
|
||||
extern bool float48lt(float32 arg1, float64 arg2);
|
||||
extern bool float48le(float32 arg1, float64 arg2);
|
||||
extern bool float48gt(float32 arg1, float64 arg2);
|
||||
extern bool float48ge(float32 arg1, float64 arg2);
|
||||
extern bool float84eq(float64 arg1, float32 arg2);
|
||||
extern bool float84ne(float64 arg1, float32 arg2);
|
||||
extern bool float84lt(float64 arg1, float32 arg2);
|
||||
extern bool float84le(float64 arg1, float32 arg2);
|
||||
extern bool float84gt(float64 arg1, float32 arg2);
|
||||
extern bool float84ge(float64 arg1, float32 arg2);
|
||||
|
||||
/* geo_ops.c, geo_selfuncs.c */
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: dt.h,v 1.7 1997/04/27 19:24:16 thomas Exp $
|
||||
* $Id: dt.h,v 1.8 1997/05/11 15:13:49 thomas Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -287,8 +287,8 @@ extern DateTime *datetime_sub_span(DateTime *dt, TimeSpan *span);
|
||||
|
||||
extern void GetCurrentTime(struct tm *tm);
|
||||
extern DateTime SetDateTime(DateTime datetime);
|
||||
extern DateTime tm2datetime(struct tm *tm, double fsec, int *tzp);
|
||||
extern int datetime2tm( DateTime dt, int *tzp, struct tm *tm, double *fsec);
|
||||
extern int tm2datetime(struct tm *tm, double fsec, int *tzp, DateTime *dt);
|
||||
extern int datetime2tm( DateTime dt, int *tzp, struct tm *tm, double *fsec, char **tzn);
|
||||
|
||||
extern int timespan2tm(TimeSpan span, struct tm *tm, float8 *fsec);
|
||||
extern int tm2timespan(struct tm *tm, double fsec, TimeSpan *span);
|
||||
@ -323,7 +323,7 @@ extern int DecodeDateDelta( char *field[], int ftype[],
|
||||
extern int DecodeUnits(int field, char *lowtoken, int *val);
|
||||
|
||||
extern int EncodeSpecialDateTime(DateTime dt, char *str);
|
||||
extern int EncodeDateTime(struct tm *tm, double fsec, int *tzp, int style, char *str);
|
||||
extern int EncodeDateTime(struct tm *tm, double fsec, int *tzp, char **tzn, int style, char *str);
|
||||
extern int EncodeTimeSpan(struct tm *tm, double fsec, int style, char *str);
|
||||
|
||||
extern datetkn *datebsearch(char *key, datetkn *base, unsigned int nel);
|
||||
|
Loading…
Reference in New Issue
Block a user