code: def dump(
      state, host,
      remote_filename, database=None,
      # Details for speaking to PostgreSQL via `psql` CLI
      postgresql_user=None, postgresql_password=None,
      postgresql_host=None, postgresql_port=None,
  ):
      '''
      Dump a PostgreSQL database into a ``.sql`` file. Requires ``mysqldump``.
  
      + database: name of the database to dump
      + remote_filename: name of the file to dump the SQL to
      + postgresql_*: global module arguments, see above
      '''
  
      yield '{0} > {1}'.format(make_psql_command(
          executable='pg_dump',
          database=database,
          user=postgresql_user,
          password=postgresql_password,
          host=postgresql_host,
          port=postgresql_port,
      ), remote_filenamef dump(
      state, host,
      remote_filename, database=None,
      # Details for speaking to PostgreSQL via `psql` CLI
      postgresql_user=None, postgresql_password=None,
      postgresql_host=None, postgresql_port=None,
  ):
      '''
      Dump a PostgreSQL database into a ``.sql`` file. Requires ``mysqldump``.
  
      + database: name of the database to dump
      + remote_filename: name of the file to dump the SQL to
      + postgresql_*: global module arguments, see above
      '''
  
      yield '{0} > {1}'.format(make_psql_command(
          executable='pg_dump',
          database=database,
          user=postgresql_user,
          password=postgresql_password,
          host=postgresql_host,
          port=postgresql_port,
      ), remote_filename)
docs: Dump a PostgreSQL database into a ``.sql`` file. Requires ``mysqldump``.
  
      + database: name of the database to dump
      + remote_filename: name of the file to dump the SQL to
      + postgresql_*: global module arguments, see above