Get rid of postgres.c's separate parsing logic for PGDATESTYLE env.
Tom Lane <tgl@sss.pgh.pa.us>
Get rid of postgres.c's separate parsing logic for PGDATESTYLE env. variable, instead calling same code in variable.c that is used to parse SET DATESTYLE. Fix bug: although backend's startup datestyle had been changed to ISO, 'RESET DATESTYLE' and 'SET DATESTYLE TO DEFAULT' didn't know about it. For consistency I have made the latter two reset to the PGDATESTYLE-defined initial value, which may not be the same as the compiled-in default of ISO.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/variable.c | modified | +165 −116 |
| src/backend/tcop/postgres.c | modified | +5 −27 |
| src/include/commands/variable.h | modified | +5 −21 |