Re: preserving statistics settings - Mailing list pgsql-hackers

From nconway@klamath.dyndns.org (Neil Conway)
Subject Re: preserving statistics settings
Date
Msg-id 20020719165143.GA22115@klamath.dyndns.org
Whole thread Raw
In response to Re: preserving statistics settings  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: preserving statistics settings  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jul 19, 2002 at 12:39:16PM -0400, Tom Lane wrote:
> nconway@klamath.dyndns.org (Neil Conway) writes:
> > Shouldn't the effect of ALTER TABLE ALTER COLUMN SET STATISTICS be
> > recorded by pg_dump?

> One problem is that I didn't really want to enshrine the current
> default value in a bunch of pg_dump scripts, in case we decide it's
> too small.

Good point.

> If there were a reliable way to tell whether the attstattarget value had
> actually been set by the user, or was merely a default, it'd be easier
> to determine what pg_dump should do.

Hmmm... we could allow SET STATISTICS to take 'DEFAULT' easily enough
(and that might even be a good idea in any case), but you're right --
without a way for pg_dump to determine the default value and/or whether
the admin have explicitely changed the attstattarget for that column,
there's not much that can be done...

I suppose we could hard-code the current default value into pg_dump,
but that's pretty ugly.

Does anyone have a better suggestion?

Cheers,

Neil

-- 
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: preserving statistics settings
Next
From: Barry Lind
Date:
Subject: Re: heap_delete, heap_mark4update must reset t_ctid