Re: [GENERAL] [SQL] encrypt psql password in unix script

2015-07-08 Thread Steve Midgley
My suggestion is to put it in an environment variable and set that variable from a shell startup script that is secured with permissions. ( http://www.postgresql.org/docs/9.4/static/libpq-envars.html) If you can't do that, the only other method I've used is to setup Postgres with Ansible, and stor

Re: [GENERAL] [SQL] extracting PII data and transforming it across table.

2015-05-21 Thread Steve Midgley
I would update the IDs using SQL before dumping if possible. If necessary clone the tables, adjust the IDs and then dump. SQL has better tools than most languages/scripts to adjust values in columns across multiple entities. Plus it should be easier to build some test queries in SQL to validate tha

Re: [SQL] [GENERAL] documenting tables version control

2015-05-06 Thread Steve Midgley
I just use sql tables. But if I represent them outside of pg I usually use migration files which are part of ruby on rails. But sqitch looks good too. Steve On May 6, 2015 7:31 AM, "Suresh Raja" wrote: > Thanks Melvin, Joshua, PT and Steve! > > your information is good. Im looking for creating

Re: [SQL] [GENERAL] documenting tables version control

2015-05-06 Thread Steve Midgley
I just use sql tables. But if I represent them outside of pg I usually use migration files which are part of ruby on rails. But sqitch looks good too. Steve On May 6, 2015 7:31 AM, "Suresh Raja" wrote: > Thanks Melvin, Joshua, PT and Steve! > > your information is good. Im looking for creating

Re: [GENERAL] [SQL] documenting tables version control

2015-05-05 Thread Steve Midgley
System catalogs should help, unless I misunderstand your question: http://www.postgresql.org/docs/9.4/static/catalogs.html http://www.postgresql.org/docs/9.4/static/view-pg-tables.html http://stackoverflow.com/questions/20698169/how-to-use-postgres-pg-tables-to-compare-contraints On Tue, May 5