Remove sed command from generate_fixtures

This commit is contained in:
Mario de Frutos 2018-04-13 09:54:38 +02:00
parent eb761cc6e7
commit c0126bf5c7

View File

@ -236,7 +236,6 @@ def dump(cols, tablename, where=''):
subprocess.check_call('PGPASSWORD={pgpassword} PGUSER={pguser} PGHOST={pghost} PGDATABASE={pgdb} ' subprocess.check_call('PGPASSWORD={pgpassword} PGUSER={pguser} PGHOST={pghost} PGDATABASE={pgdb} '
'pg_dump -x --section=pre-data -t observatory.{tablename} ' 'pg_dump -x --section=pre-data -t observatory.{tablename} '
' | sed "s:SET search_path.*::" ' ' | sed "s:SET search_path.*::" '
' | sed "s:CREATE TABLE :CREATE TABLE observatory.:" '
' | sed "s:ALTER TABLE.*OWNER.*::" ' ' | sed "s:ALTER TABLE.*OWNER.*::" '
' | sed "s:SET idle_in_transaction_session_timeout.*::" ' ' | sed "s:SET idle_in_transaction_session_timeout.*::" '
' >> {outfile}'.format( ' >> {outfile}'.format(