mirror of
https://github.com/postgres/postgres.git
synced 2026-05-28 04:35:45 -04:00
Applied patch to fix two compatibility functions.
This commit is contained in:
parent
ffcb1491af
commit
96be4b28a3
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue