Thread

  1. COPY doesn't works when containing '' or '' characters on db

    Jaume Teixi <teixi@6tems.com> — 2001-02-26T13:28:58Z

    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
    
    
  2. Re: COPY doesn't works when containing ' ' or ' ' characters on db

    Tom Lane <tgl@sss.pgh.pa.us> — 2001-02-27T03:16:35Z

    Jaume Teixi <teixi@6tems.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
    
    
  3. Re: SOLVED: COPY doesn't works when containing ' ' or ' ' characters on db

    Jaume Teixi <teixi@6tems.com> — 2001-02-27T09:19:12Z

    On Mon, 26 Feb 2001 22:16:35 -0500 Tom Lane <tgl@sss.pgh.pa.us> wrote:
    
    > Jaume Teixi <teixi@6tems.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!
    
    
    
  4. RE: COPY doesn't works when containing ' ' or ' ' characters on db

    Rainer Mager <rmager@vgkk.com> — 2001-02-28T23:01:32Z

    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@postgresql.org
    > [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Tom Lane
    > Sent: Tuesday, February 27, 2001 12:17 PM
    > To: Jaume Teixi
    > Cc: pgsql-hackers@postgresql.org; pgsql-admin@postgresql.org; Richard T.
    > Robino; Stefan Huber
    > Subject: Re: [ADMIN] COPY doesn't works when containing ' ' or ' '
    > characters on db
    >
    >
    > Jaume Teixi <teixi@6tems.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痺蜿釶辞頤黶辣繻繪纈蒹鱚蜴
    迚粐跂 帙鴒粐葹模蛋姪鈔磔釿閼蜴苴鱚阨皷鈑蜀銷壽蜩繞逑蜍蜚矼磔齠碯竅逾苺纉癆糟齒蜒倆齡苒纉纈皷闔鱚阨鉗鈑黶蜆迚齠繖
    			鱚艨鰾鵺闕瘤
    
    
  5. log files

    Rainer Mager <rmager@vgkk.com> — 2001-05-04T05:16:39Z

    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
    
    
    
  6. Re: log files

    Tom Lane <tgl@sss.pgh.pa.us> — 2001-05-04T13:51:07Z

    "Rainer Mager" <rmager@vgkk.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
    
    
  7. Postgres <-> Oracle

    Rainer Mager <rmager@vgkk.com> — 2001-05-13T22:55:38Z

    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