pgsql-server/src include/utils/timestamp.h bac ...

From: thomas(at)postgresql(dot)org (Thomas Lockhart)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server/src include/utils/timestamp.h bac ...
Date: 2002-08-04 06:44:47
Message-ID: 20020804064447.D79D5476520@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

CVSROOT: /cvsroot
Module name: pgsql-server
Changes by: thomas(at)postgresql(dot)org 02/08/04 02:44:47

Modified files:
src/include/utils: timestamp.h

Log message:
Define macros for handling typmod manipulation for date/time types.
Should be more robust than all of that brute-force inline code.
Rename macros for masking and typmod manipulation to put TIMESTAMP_
or INTERVAL_ in front of the macro name, to reduce the possibility
of name space collisions.

Modified files:
src/backend/utils/adt: date.c datetime.c format_type.c
nabstime.c timestamp.c varlena.c

Log message:
Add guard code to protect from buffer overruns on long date/time input
strings. Should go back in and look at doing this a bit more elegantly
and (hopefully) cheaper. Probably not too bad anyway, but it seems a
shame to scan the strings twice: once for length for this buffer overrun
protection, and once to parse the line.
Remove use of pow() in date/time handling; was already gone from everything
*but* the time data types.
Define macros for handling typmod manipulation for date/time types.
Should be more robust than all of that brute-force inline code.
Rename macros for masking and typmod manipulation to put TIMESTAMP_
or INTERVAL_ in front of the macro name, to reduce the possibility
of name space collisions.

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Lockhart 2002-08-04 06:46:12 pgsql-server/src/backend/parser parse_expr.c
Previous Message Thomas Lockhart 2002-08-04 06:36:18 pgsql-server/src/backend/parser scan.l

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2002-08-04 06:50:08 Re: Table inheritance versus views
Previous Message Curt Sampson 2002-08-04 06:41:21 Re: Why is MySQL more chosen over PostgreSQL