nconway@klamath.dyndns.org (Neil Conway) writes:
> 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.
Also, there's no guarantee that pg_dump would know what default the
backend had been compiled with, so it might make the wrong conclusion
anyway.
> Does anyone have a better suggestion?
Not sure why I didn't think of this before, but we could make the stored
value of attstattarget be "-1" to indicate "use the default". Zero or a
positive value then indicates an explicit selection. We can't
retroactively fix 7.2, but going forward we'd have a reasonable answer.
regards, tom lane