Lists: | pgsql-adminpgsql-hackers |
---|
From: | Jaume Teixi <teixi(at)6tems(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org |
Cc: | "Richard T(dot) Robino" <rickspam(at)wavedivision(dot)com>, Stefan Huber <schweinsaug(at)crosswinds(dot)net> |
Subject: | COPY doesn't works when containing '' or '' characters on db |
Date: | 2001-02-26 13:28:58 |
Message-ID: | 20010226142858.2f1fcee8.teixi@6tems.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
I finally percated that when data contains 'ñ' or 'à' it's impossible to
parse trought:
COPY products FROM '/var/lib/postgres/dadesi.txt' USING DELIMITERS '|' \g
it causes:
SELECT edicion FROM products;
edicion
-----------------
España|Nacional <-------puts on the same cell either there's an '|' in
the middle!!!
but changing 'ñ' for n
SELECT edicion FROM products;
edicion
-----------------
Espana <---------------it separates cells ok
so what's my solution for a text to COPY containing such characters?
best regards,
jaume
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jaume Teixi <teixi(at)6tems(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org, "Richard T(dot) Robino" <rickspam(at)wavedivision(dot)com>, Stefan Huber <schweinsaug(at)crosswinds(dot)net> |
Subject: | Re: COPY doesn't works when containing ' ' or ' ' characters on db |
Date: | 2001-02-27 03:16:35 |
Message-ID: | 27748.983243795@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
Jaume Teixi <teixi(at)6tems(dot)com> writes:
> I finally percated that when data contains '' or '' it's impossible to
> parse trought:
> COPY products FROM '/var/lib/postgres/dadesi.txt' USING DELIMITERS '|' \g
> it causes:
> SELECT edicion FROM products;
> edicion
> -----------------
> Espaa|Nacional <-------puts on the same cell either there's an '|' in
> the middle!!!
Very odd. What LOCALE and multibyte encodings are you using, if any?
This seems like it must be a multibyte issue, but I can't guess what.
Also, which Postgres version are you running? If you said, I missed it.
regards, tom lane
From: | Jaume Teixi <teixi(at)6tems(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: SOLVED: COPY doesn't works when containing ' ' or ' ' characters on db |
Date: | 2001-02-27 09:19:12 |
Message-ID: | 20010227101912.62338293.teixi@6tems.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
On Mon, 26 Feb 2001 22:16:35 -0500 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jaume Teixi <teixi(at)6tems(dot)com> writes:
> > I finally percated that when data contains 'ñ' or 'à' it's impossible
to
> > parse trought:
>
> > COPY products FROM '/var/lib/postgres/dadesi.txt' USING DELIMITERS '|'
\g
>
> > it causes:
>
> > SELECT edicion FROM products;
> > edicion
> > -----------------
> > España|Nacional <-------puts on the same cell either there's an '|'
in
> > the middle!!!
I finally, thanks to Oliver Elphick,
managed to create database with:
CREATE DATABASE "demo" WITH ENCODING = 'SQL_ASCII'
and data was imported OK, great, thanks!
From: | "Rainer Mager" <rmager(at)vgkk(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-admin(at)postgresql(dot)org> |
Subject: | RE: COPY doesn't works when containing ' ' or ' ' characters on db |
Date: | 2001-02-28 23:01:32 |
Message-ID: | NEBBJBCAFMMNIHGDLFKGKEPKDCAA.rmager@vgkk.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
I haven't been following this thread very carefully but I just remembered a
similar problem we had that is probably related. We did a dump from a UTF-8
db containind English, Japanese, and Korean data. When the dump was done in
the default mode (e.g., via COPY statements) then we could no restore it. It
would die on certain characters. We then tried dumping in with -nd flags.
This fixed the problem for us although the restore is a lot slower.
--Rainer
> -----Original Message-----
> From: pgsql-admin-owner(at)postgresql(dot)org
> [mailto:pgsql-admin-owner(at)postgresql(dot)org]On Behalf Of Tom Lane
> Sent: Tuesday, February 27, 2001 12:17 PM
> To: Jaume Teixi
> Cc: pgsql-hackers(at)postgresql(dot)org; pgsql-admin(at)postgresql(dot)org; Richard T.
> Robino; Stefan Huber
> Subject: Re: [ADMIN] COPY doesn't works when containing ' ' or ' '
> characters on db
>
>
> Jaume Teixi <teixi(at)6tems(dot)com> writes:
> > I finally percated that when data contains '・ or '・ it's impossible to
> > parse trought:
>
> > COPY products FROM '/var/lib/postgres/dadesi.txt' USING
> DELIMITERS '|' \g
>
> > it causes:
>
> > SELECT edicion FROM products;
> > edicion
> > -----------------
> > Espa痺蜿釶辞頤黶辣繻繪纈蒹鱚蜴
迚粐跂 帙鴒粐葹模蛋姪鈔磔釿閼蜴苴鱚阨皷鈑蜀銷壽蜩繞逑蜍蜚矼磔齠碯竅逾苺纉癆糟齒蜒倆齡苒纉纈皷闔鱚阨鉗鈑黶蜆迚齠繖
鱚艨鰾鵺闕瘤
From: | "Rainer Mager" <rmager(at)vgkk(dot)com> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | log files |
Date: | 2001-05-04 05:16:39 |
Message-ID: | NEBBJBCAFMMNIHGDLFKGKEHLDMAA.rmager@vgkk.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
Hi all,
Is there anyway to get the debug (-d2) log files to mark each transaction
with a unique ID. We're trying to debug dead locks and the transactions seem
to be mixed together somewhat.
Thanks,
--Rainer
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Rainer Mager" <rmager(at)vgkk(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: log files |
Date: | 2001-05-04 13:51:07 |
Message-ID: | 24465.988984267@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
"Rainer Mager" <rmager(at)vgkk(dot)com> writes:
> Is there anyway to get the debug (-d2) log files to mark each transaction
> with a unique ID.
Not per-transaction, but there's an option to include the backend PID,
which should help.
regards, tom lane
From: | "Rainer Mager" <rmager(at)vgkk(dot)com> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Postgres <-> Oracle |
Date: | 2001-05-13 22:55:38 |
Message-ID: | NEBBJBCAFMMNIHGDLFKGGECCDOAA.rmager@vgkk.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
Hi all,
We have an application that runs on both Postgres and Oracle. One problem
we've been facing as maintaining the the installed/default database for the
application. Once it is up and running, things are fine, but since we
primarily develop on Postgres we sometimes hit problems when it is time to
convert all of our work to Oracle. I was wondering if anyone knows of any
tools that take a Postgres dump and convert it to something Oracle can
accept?
Thanks,
--Rainer