Re: bug in pg_dump ALTER DATABASE

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bug in pg_dump ALTER DATABASE
Date: 2004-07-13 07:31:03
Message-ID: 40F38FB7.3000002@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> As part of my testing, I noticed this bug. My database has a
> search_path set in the database vars. It dumps lik ethis:
>
> DROP DATABASE usa;
> CREATE DATABASE usa WITH TEMPLATE = template0 OWNER = usadmin ENCODING =
> 'LATIN1';
> ALTER DATABASE usa SET search_path TO 'public, contrib';
>
> Notice the single quotes around the TO bit? That's completely broken.
> Those '' must not be there.
>
> Is a fix for this required for only search_path, or is it a more general
> problem?

So what are we going to do about this problem?

The pg_settings view does not have enough information to determine it
generically. (It only says 'string', not 'list'...)

I propose that we modify pg_dumpall to hard-code the set of list-type
GUC variables for each backend version.

The current (CVS) list of such GUCs is:

* DateStyle
* preload_libraries
* search_path
* log_destination
* custom_variable_classes (probably doesn't need to be worried about)

Shall I go ahead and do this?

Chris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-07-13 07:33:08 Another pg_dump bug
Previous Message Josh Berkus 2004-07-13 04:26:37 Re: possibly updating techdocs; mysql2pgsql on gborg