Disabling function validation

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Disabling function validation
Date: 2003-10-06 22:52:44
Message-ID: 200310062252.h96Mqi419994@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Peter Eisentraut wrote:
> >> Given that new languages don't tend to appear out of the blue, I think
> >> it's reasonable to design the feature considering the languages currently
> >> available.
>
> I think that position is sufficiently rebutted by Bruce's observation:
>
> > Once we put a GUC value in a dump, we have to keep that parameter valid
> > almost forever.
>
> Since we are inventing this thing specifically to put it in dump files,
> we had better take a very long-term view of its purposes.
>
> >> None of these languages except the
> >> first two have anything to gain, but everything to lose, if they were
> >> asked not to check the function body during a dump restore.
>
> That's why the code leaves it up to the individual validator routine how
> much to check or not check depending on the flag setting. I have no
> problem with an individual language deciding that it should or shouldn't
> do a particular check. I do think that we'd be foolish to make advance
> judgements about what those decisions will be.
>
> Bottom line is that I wouldn't object to changing the switch name to
> something more general ("restore_validation_mode", maybe?) but I think
> that changing it to something more specific would be a mistake in the
> long run.

[ Moved to hackers.]

I think we should change the "check_function_bodies" to something more
general. I like "restore_validation_mode" because it could also be used
to disable foreign key checks which we are discussing. An even more
general idea would be to have something like "restore_mode", and perhaps
could handle cases like allowing a larger sort_mem or other
optimizations during restore.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2003-10-06 23:13:30 Re: Disabling function validation
Previous Message Peter Eisentraut - PostgreSQL 2003-10-06 21:50:45 pgsql-server/src/bin/psql nls.mk po/it.po

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-10-06 22:55:13 Re: Architecture Roadmap?
Previous Message James Rogers 2003-10-06 22:48:08 Architecture Roadmap?