]> granicus.if.org Git - postgresql/commit
Move DTK_ISODOW DTK_DOW and DTK_DOY to be type UNITS rather than
authorGreg Stark <stark@mit.edu>
Sun, 6 Sep 2015 03:02:57 +0000 (04:02 +0100)
committerGreg Stark <stark@mit.edu>
Sun, 6 Sep 2015 03:05:20 +0000 (04:05 +0100)
commit530d0c504fe636b0ed4a3817b1e9806dd55a52b6
tree31e3556c269cbbf3881ba5e949e6f6b1b3890283
parent567acf259b25961e473d48e288ec3c98d7008763
Move DTK_ISODOW DTK_DOW and DTK_DOY to be type UNITS rather than
    RESERV. RESERV is meant for tokens like "now" and having them in that
    category throws errors like these when used as an input date:

    stark=# SELECT 'doy'::timestamptz;
    ERROR:  unexpected dtype 33 while parsing timestamptz "doy"
    LINE 1: SELECT 'doy'::timestamptz;
                   ^
    stark=# SELECT 'dow'::timestamptz;
    ERROR:  unexpected dtype 32 while parsing timestamptz "dow"
    LINE 1: SELECT 'dow'::timestamptz;
                   ^

    Found by LLVM's Libfuzzer
src/backend/utils/adt/datetime.c
src/backend/utils/adt/timestamp.c