diff --git a/README.md b/README.md index 549d932..3d22245 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really warrant a full blog post. These are mostly things I learn by pairing with smart people at [Hashrocket](http://hashrocket.com/). -_481 TILs and counting..._ +_482 TILs and counting..._ --- @@ -234,6 +234,7 @@ _481 TILs and counting..._ - [Export Query Results To A CSV](postgres/export-query-results-to-a-csv.md) - [Extracting Nested JSON Data](postgres/extracting-nested-json-data.md) - [Find The Data Directory](postgres/find-the-data-directory.md) +- [Find The Location Of Postgres Config Files](postgres/find-the-location-of-postgres-config-files.md) - [Fizzbuzz With Common Table Expressions](postgres/fizzbuzz-with-common-table-expressions.md) - [Generate A UUID](postgres/generate-a-uuid.md) - [Generate Series Of Numbers](postgres/generate-series-of-numbers.md) diff --git a/postgres/find-the-location-of-postgres-config-files.md b/postgres/find-the-location-of-postgres-config-files.md new file mode 100644 index 0000000..1f37f3f --- /dev/null +++ b/postgres/find-the-location-of-postgres-config-files.md @@ -0,0 +1,17 @@ +# Find The Location Of Postgres Config Files + +If you can connect to your database with `psql`, then you can easily find +the location of your Postgres config files. After connecting, I can ask +Postgres to show me where the main config file is: + +```sql +> show config_file; + config_file +-------------------------------------------------------------------------------- + /Users/jbranchaud/Library/Application Support/Postgres/var-9.5/postgresql.conf +``` + +In the same directory as that `postgresql.conf` file are a number of other +configuration files such as the `pg_hba.conf` file. + +h/t Dillon Hafer