| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | pg_dump and money type |
| Date: | 2007-09-11 14:39:45 |
| Message-ID: | 200709111639.45434.peter_e@gmx.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Since the money type has a locale dependent input and output format, there has
to be some context saved when a database dump is created. For example, if
your environment uses a locale that uses the opposite point-vs-comma
conventions from English (e.g., de_DE), then the following will fail to
replicate the regression test database:
pg_dump regression | psql foo
The database regression has lc_monetary = C set, so this will produce C output
piped into, say, de_DE input.
The first problem appears to be that pg_dump --create ought to save the
database-specific configuration settings. pg_dumpall gets this right. But
secondly, lc_monetary ought to be saved at the top of the dump file, much
like client_encoding. Unfortunately, that would probably break portability
of dump files between different operating systems. Perhaps we can get away
with fixing --create and documenting this. But something ought to be done
about this; otherwise using the money type introduces a risk of breaking
backup or upgrade procedures.
Comments?
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Riggs | 2007-09-11 14:44:00 | Re: Final Thoughts for 8.3 on LWLocking and Scalability |
| Previous Message | Marko Kreen | 2007-09-11 14:28:27 | Re: pgcrypto related backend crash on solaris 10/x86_64 |