diff options
author | Michael Meskes <meskes@postgresql.org> | 2003-07-16 13:18:51 +0000 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2003-07-16 13:18:51 +0000 |
commit | 96be4b28a31e37d2eb2757118164a6c9ae297d46 (patch) | |
tree | f6fdd5c1b575b26859c20b8092c75614ee8a6e3f | |
parent | ffcb1491af36637b82041708802d239b8006837d (diff) | |
download | postgresql-96be4b28a31e37d2eb2757118164a6c9ae297d46.tar.gz postgresql-96be4b28a31e37d2eb2757118164a6c9ae297d46.zip |
Applied patch to fix two compatibility functions.
-rw-r--r-- | src/interfaces/ecpg/compatlib/informix.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index d8bbd0d434e..d60019f68f9 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -415,8 +415,8 @@ rdatestr (Date d, char *str) return -1210; /* move to user allocated buffer */ - strcpy(tmp, str); - free(str); + strcpy(str, tmp); + free(tmp); return 0; } @@ -532,6 +532,10 @@ dtsub (Timestamp *ts1, Timestamp *ts2, Interval *iv) int dttoasc (Timestamp *ts, char *output) { + char *asctime = PGTYPEStimestamp_to_asc( *ts ); + + strcpy (output, asctime); + free(asctime); return 0; } |