Skip to content

Ignore system psqlrc and local .psqlrc when dropping test databases

Administrator requested to merge flying-robot/ignore-psqlrc into main

Created by: flying-robot

Depending on your particular .psqlrc customizations, omitting the -X flag from psql invocations may include formatting details in the output:

$ psql -c 'copy (select 1) to stdout'
Border style is 2.
Line style is unicode.
1
Time: 0.553 ms

That disrupts downstream tools like grep. The -X flag skips reading the system psqlrc and local .psqlrc file, which fixes the issue:

$ psql -Xc 'copy (select 1) to stdout'
1

Merge request reports

Loading