Re: type money causes unrestorable dump

From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: type money causes unrestorable dump
Date: 2007-11-03 12:06:42
Message-ID: 20071103080642.5f78ee89.darcy@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 9 Oct 2007 13:16:08 -0400
"D'Arcy J.M. Cain" <darcy(at)druid(dot)net> wrote:
> On Tue, 9 Oct 2007 19:02:38 +0200
> Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> > Am Dienstag, 9. Oktober 2007 schrieb D'Arcy J.M. Cain:
> > > +    Due to locale changes this type may have problems with dump and
> > > +    restore and care should be taken.
> >
> > With respect, this kind of advice is useless. What are the problems, when do
> > they occur, and what should be done about them? We do know the answers to
> > all of these questions.
>
> Right. How about this:
>
> ...
> restore and care should be taken when dumping and reloading from
> different locales. To avoid problems always explicitely set your
> locale before both a dump and reload and make sure that they are
> identical.

I never received a response on this. Here is the full diff with the
above change. Since it is documentation and not code, is it OK to
commit this now?

Index: datatype.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v
retrieving revision 1.211
diff -u -p -u -r1.211 datatype.sgml
--- datatype.sgml 21 Oct 2007 20:04:37 -0000 1.211
+++ datatype.sgml 3 Nov 2007 12:03:55 -0000
@@ -834,14 +834,6 @@ ALTER SEQUENCE <replaceable class="param
<sect1 id="datatype-money">
<title>Monetary Types</title>

- <note>
- <para>
- The <type>money</type> type is deprecated. Use
- <type>numeric</type> or <type>decimal</type> instead, in
- combination with the <function>to_char</function> function.
- </para>
- </note>
-
<para>
The <type>money</type> type stores a currency amount with a fixed
fractional precision; see <xref
@@ -852,6 +844,15 @@ ALTER SEQUENCE <replaceable class="param
Output is generally in the latter form but depends on the locale.
</para>

+ <para>
+ Due to locale changes this type may have problems with dump and
+ restore and care should be taken when dumping and reloading from
+ different locales. To avoid problems always explicitely set your
+ locale before both a dump and reload and make sure that they are
+ identical.
+
+ </para>
+
<table id="datatype-money-table">
<title>Monetary Types</title>
<tgroup cols="4">

--
D'Arcy J.M. Cain <darcy(at)druid(dot)net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ohp 2007-11-03 13:54:25 Re: should I worry?
Previous Message Stefan Kaltenbrunner 2007-11-03 09:03:59 Re: Test lab