puppetlabs/puppetlabs-postgresql

Postgresql_Conf[log_prefix] not accepting '[%p] %q:%u:%d:%x ' anymore

torstenfohrer opened this issue · 2 comments

Describe the Bug

New postgresql config parser not accepting valid values

image

Environment

  • Version 10.0.1 (working with 9.2.0)

Note for the PR:

List of Postgresql Data Types: https://www.postgresql.org/docs/current/datatype.html

The Postgresql.conf includes the following Data Types:

  • Boolean
  • Enum
  • Integer
  • Real
  • String

The following SQL query shows the current settings with values and data type:

select name,setting,vartype from pg_settings;

This Regex should work: ^(\S.*)?$

Here is a link to a regex checker: https://regex101.com/r/M9RDwz/1

If the link is dead, here is a copy of the examples, these should be used in a spec test:

# complex strings
'[%p] %q:%u:%d:%x '
'psql_01-%Y-%m-%d.log'
'%t %q%u@%d %p %i '
# boolean https://www.postgresql.org/docs/current/datatype-boolean.html
true
yes
on
1
false
no
off
0
# enums https://www.postgresql.org/docs/current/datatype-enum.html
TLSv1.2
local0
replica
scram-sha-256
read committed
# integer https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-INT
1
20
200
1024
16777216
# real https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-NUMERIC
0.1 
0
1
1.1
# string, didnt't find a docs link, examples from select name,setting,vartype from pg_settings;
latest
"$user", public
/var/run/postgresql, /tmp
pg_stat_tmp
HIGH:MEDIUM:+3DES:!aNULL
/opt/pgsql/ssl/server.crt