Re: pg_dump and backslash escapes

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_dump and backslash escapes
Дата
Msg-id 200605171335.k4HDZVT13531@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump and backslash escapes  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: pg_dump and backslash escapes
Список pgsql-hackers
The basic issue is that we need to set standard_conforming_strings to
'off' for loading into newer releases, >= 8.2, but that SET command is
going to generate an error even dumping/loading into the same version of
PostgreSQL, like 7.3 to 7.3.  I don't think we want that, do we? I agree
we can have errors when doing cross-version dumps, but have we ever
generated errors when dumping/reloading into the same version?

We don't need to set escape_string_warning because it is just a warning
message and the warning will only happen when loading into 8.2 or later,
so we could skip that part of the patch. But, I figured as long as we
are suppressing warnings at that point, might as well add that too.

---------------------------------------------------------------------------

Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > I have seen no reply to my suggestion below, so I assume it is the way
> > > people want to go for 7.3, 7.4, and 8.0.
> > 
> > I'm not particularly for it, if that's what you meant, and certainly not
> > for hacking up old branches that way.  For one thing, you can't
> > retroactively cause servers that are already out there to not spit
> > errors for GUC variables they've not heard of; and even if you had such
> > a time-travel machine at hand, it's far from clear that it'd be a good
> > idea.
> > 
> > The pg_dump philosophy for cross-version updates is generally that the
> > dump should load if you are willing to ignore errors and press on.  Not
> > that there will never be errors.  See for example our previous handling
> > of the without_oids business, or search_path, or tablespaces.
> 
> So, we should SET the variables and allow people to get the errors on
> load?  And not supress them from the client and server logs?  Is that
> better than suppressing them?
> 
> -- 
>   Bruce Momjian   http://candle.pha.pa.us
>   EnterpriseDB    http://www.enterprisedb.com
> 
>   + If your life is a hard drive, Christ can be your backup. +
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
> 

--  Bruce Momjian   http://candle.pha.pa.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Return results for PQexec vs PQexecP*
Следующее
От: Zdenek Kotala
Дата:
Сообщение: What default is - SET behavior