igorludi
igorludi

Reputation: 1581

PostgreSQL 12+ ignoring datestyle setting in the postgresql.conf

I can not set the German datestyle format in Postgres (or any other than ISO).

I have set datestyle = 'German' in postgresql.conf and restarted the service and still show datestyle; reports 'ISO, DMY'.

Tried on:

Also tried datestyle = 'SQL' with the same effect, still 'ISO, DMY'.

Tried ALTER DATABASE database_name SET datestyle TO "German";, even restarted - also does not work. The only thing working is per session statement set datestyle='german' but I want to change it permanently.

What am I missing?

Upvotes: 0

Views: 625

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 247485

The setting in postgresql.conf must be overridden somewhere. Look at pg_settings:

SELECT setting, source, sourcefile, sourceline
FROM pg_settings
WHERE name = 'DateStyle';

The source column will tell you where your setting comes from. Perhaps your client overrides the server setting.

Upvotes: 1

Related Questions