mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Allow interpretation of INTERVALs with more timezone-like syntax.
Define conversions to and from text for date, time, and timetz. Have millisecond and microsecond return full # of seconds in those units. Previously, only returned full fractional part in those units.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.37 2000/11/06 15:57:00 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.38 2000/11/11 19:55:19 thomas Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2100,11 +2100,11 @@ interval_part(PG_FUNCTION_ARGS)
|
||||
switch (val)
|
||||
{
|
||||
case DTK_MICROSEC:
|
||||
result = (fsec * 1000000);
|
||||
result = ((tm->tm_sec + fsec) * 1000000);
|
||||
break;
|
||||
|
||||
case DTK_MILLISEC:
|
||||
result = (fsec * 1000);
|
||||
result = ((tm->tm_sec + fsec) * 1000);
|
||||
break;
|
||||
|
||||
case DTK_SECOND:
|
||||
|
Reference in New Issue
Block a user