]> 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:02:57 +0000 (04:02 +0100)
commit07cef3eb8a621690ff5e1a1d576656284957caf1
treebae62fd50a2ba2800cabf6ee218639f5ae900518
parent20d309a8f4c3c033b1d1202b77d1115a9d5bfb2b
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