On 17.12.21 at 21:21 wrote Paul Gevers: > Control: tags -1 moreinfo pending > > Hi Jörg, > > Thanks. > > On 16-12-2021 19:27, Jörg Steffens wrote: >> >> PostgreSQL "CREATE DATABASE" support parameter. >> While setting the ENCODING is already implemented with dbconfig, setting >> LC_COLLATE and LC_CTYPE is not. > > Are there other parameters possible? Should they not be supported?
New versions of potgresql may add parameter, but for postgresql-10 they are: CREATE DATABASE name [ [ WITH ] [ OWNER [=] user_name ] [ TEMPLATE [=] template ] [ ENCODING [=] encoding ] [ LC_COLLATE [=] lc_collate ] [ LC_CTYPE [=] lc_ctype ] [ TABLESPACE [=] tablespace_name ] [ ALLOW_CONNECTIONS [=] allowconn ] [ CONNECTION LIMIT [=] connlimit ] [ IS_TEMPLATE [=] istemplate ] ] See: https://www.postgresql.org/docs/10/sql-createdatabase.html I'm not an expert on this. The Bareos project just uses the 2 additional parameter LC_COLLATE and LC_CTYPE. ENCODING can already be given as parameter and "template0" is used as template. To specify encoding, "template0" must be used, see https://www.postgresql.org/docs/10/manage-ag-templatedbs.html, so that is fine. While these parameter must be given when creating the database, the remaining parameter can be changed afterwards with ALTER DATABASE, see https://www.postgresql.org/docs/10/sql-alterdatabase.html So from my point of view, adding this 2 parameter is fine. I considered having a parameter like dbc_pgsql_createdb_extraparamter. But then the package maintainer using dbconfig must know what version of Postgresql is installed, is this is dangerous. > I have locally committed your patch but like to see an answer to the > question above. I hope, this answers your questions. Regards, Jörg -- Jörg Steffens joerg.steff...@bareos.com Bareos GmbH & Co. KG Phone: +49 221 630693-91 http://www.bareos.com Fax: +49 221 630693-10 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646 Komplementär: Bareos Verwaltungs-GmbH Geschäftsführer: S. Dühr, M. Außendorf, Jörg Steffens, P. Storz
OpenPGP_signature
Description: OpenPGP digital signature