Hello

i don't know, whether it is a real bug or what, has been fixed or not, but
i can't find any info about it:

i try to fill my table from a file using copy from stdin and postgresql
corrupt the table. This happen if before the <tab> or end of line there
is word that has a non-standard letter like o with accent and then an
ordinary lette [a-z]. and now i reproduced this error if that o is at the
and of the word. in these cases that word and the next one get into the
same field...

why does it happen?

thanks
tRehak

------------------------------------
E-Mail: Tom Rehak <rehak@sch.bme.hu>
------------------------------------


Sun, 14 Jan 2001 18:26:35 +0100 (MET)
Rehak Tamas <rehak@sch.bme.hu>
copy from stdin; bug?
Rehak Tamas <rehak@sch.bme.hu> writes:
> i try to fill my table from a file using copy from stdin and postgresql
> corrupt the table. This happen if before the <tab> or end of line there
> is word that has a non-standard letter like o with accent and then an
> ordinary lette [a-z]. and now i reproduced this error if that o is at the
> and of the word. in these cases that word and the next one get into the
> same field...

Sounds to me like a multibyte-character translation problem.  What
encoding do you have set for the database?  What have you told it the
client encoding is?

			regards, tom lane

Sun, 14 Jan 2001 21:29:30 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: copy from stdin; bug? 
Hi

On Sun, 14 Jan 2001, Tom Lane wrote:
> Sounds to me like a multibyte-character translation problem.  What
> encoding do you have set for the database?  What have you told it the
> client encoding is?

sorry, i forgot to write:
i use debian potato, i use the standard debian packege.
version 6.5.3

i haven't set any encoding i think it must be the default (?)
i used psql to copy the texts they are iso-8859-2 encoded...

please write if you need more information.

Udv
tRehak

------------------------------------
E-Mail: Tom Rehak <rehak@sch.bme.hu>
------------------------------------


Mon, 15 Jan 2001 03:37:27 +0100 (MET)
Rehak Tamas <rehak@sch.bme.hu>
Re: copy from stdin; bug? 
> On Sun, 14 Jan 2001, Tom Lane wrote:
> > Sounds to me like a multibyte-character translation problem.  What
> > encoding do you have set for the database?  What have you told it the
> > client encoding is?
> 
> sorry, i forgot to write:
> i use debian potato, i use the standard debian packege.
> version 6.5.3
> 
> i haven't set any encoding i think it must be the default (?)
> i used psql to copy the texts they are iso-8859-2 encoded...
> 
> please write if you need more information.

Can you show me your database name and the output from 'psql -l'?
--
Tatasuo Ishii

Mon, 15 Jan 2001 12:54:36 +0900
Tatsuo Ishii <t-ishii@sra.co.jp>
Re: copy from stdin; bug? 
Hello

On Mon, 15 Jan 2001, Tatsuo Ishii wrote:
> Can you show me your database name and the output from 'psql -l'?

yes, here are the output:

datname          |datdba|encoding|datpath
-----------------+------+--------+-----------------
template1        |    31|       5|template1
map              |  1003|       5|map
helyes           |  1003|       5|helyes

i found that if i put a space behind the letters ([o with
accent][a-z][\t]) before the tab, it works correct... but without the
space it corrupt the database...

Udv
tRehak

------------------------------------
E-Mail: Tom Rehak <rehak@sch.bme.hu>
------------------------------------


Mon, 15 Jan 2001 17:11:38 +0100 (MET)
Rehak Tamas <rehak@sch.bme.hu>
Re: copy from stdin; bug? 
> yes, here are the output:
> 
> datname          |datdba|encoding|datpath
> -----------------+------+--------+-----------------
> template1        |    31|       5|template1
> map              |  1003|       5|map
> helyes           |  1003|       5|helyes
> 
> i found that if i put a space behind the letters ([o with
> accent][a-z][\t]) before the tab, it works correct... but without the
> space it corrupt the database...

The encoding of your databases are all UNICODE. So you need to input
data as UTF-8 in this case. I guess you are trying to input ISO-8859-1
encoded data that is the source of the problem. Here are possible
solutions:

1) input data as UTF-8

2) crete a new databse using encoidng LATIN1. createdb -E LATIN1...

3) upgrade to 7.1 that has the capability to do an automatic
   conversion between UTF-8 and ISO-8859-1.
--
Tatsuo Ishii


Tue, 16 Jan 2001 10:04:12 +0900
Tatsuo Ishii <t-ishii@sra.co.jp>
Re: copy from stdin; bug? 
Re

On Tue, 16 Jan 2001, Tatsuo Ishii wrote:
> The encoding of your databases are all UNICODE. So you need to input
> data as UTF-8 in this case. I guess you are trying to input ISO-8859-1
> encoded data that is the source of the problem. Here are possible
> solutions:
> 1) input data as UTF-8
:)

> 2) crete a new databse using encoidng LATIN1. createdb -E LATIN1...
yes, this will be the sollution...

> 3) upgrade to 7.1 that has the capability to do an automatic
>    conversion between UTF-8 and ISO-8859-1.
i like to use deb packages and to use 7.1 i would have to upgrade to woody
(or even sid)...

thank you for your quick help!!!

Udv
tRehak

------------------------------------
E-Mail: Tom Rehak <rehak@sch.bme.hu>
------------------------------------


Wed, 17 Jan 2001 01:40:58 +0100 (MET)
Rehak Tamas <rehak@sch.bme.hu>
Re: copy from stdin; bug? 
On Wed, Jan 17, 2001 at 01:40:58AM +0100, Rehak Tamas wrote:
> 
> > 3) upgrade to 7.1 that has the capability to do an automatic
> >    conversion between UTF-8 and ISO-8859-1.
>
> i like to use deb packages and to use 7.1 i would have to upgrade
> to woody (or even sid)...

Not true.  There are Debian source packages, and taking the source
package from Debian 2.x, x>2 (woody/sid), you can easily build it 
on Debian 2.2 (potato).  

In fact, it seems likely that a 2.2 (potato) packaging of 7.1 should be 
available from somebody else anyhow.  Oliver, do you plan to make the 
woody 7.1 package depend on any other package versions not in potato?  
If not, you can just use the 7.1 package directly on your Debian 2.2 
system.  

(Apologies to the rest for the Debian jargon.)

Nathan Myers
ncm@zembu.com

Wed, 17 Jan 2001 11:50:05 -0800
ncm@zembu.com (Nathan Myers)
Re: copy from stdin; bug?
Nathan Myers wrote:
  >In fact, it seems likely that a 2.2 (potato) packaging of 7.1 should be 
  >available from somebody else anyhow.  Oliver, do you plan to make the 
  >woody 7.1 package depend on any other package versions not in potato?  

It will automatically depend on whatever is in my machine at the time 
(unstable updated at least weekly), e.g.: libc6 2.2.1.

However, as we have with 7.0.3, we will build a version for potato on a 
potato machine and make that available for those who don't want to risk
up-grading the rest of their systems.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "And, behold, I come quickly; and my reward is with me,
      to give every man according as his work shall be."    
                               Revelation 22:12 



Wed, 17 Jan 2001 21:07:00 +0000
"Oliver Elphick" <olly@lfix.co.uk>
Re: copy from stdin; bug? 
Nathan Myers wrote:
[ ... ]

> Not true.  There are Debian source packages, 

Where are they ? I'm *quite* interested !

>                                              and taking the source
> package from Debian 2.x, x>2 (woody/sid), you can easily build it
> on Debian 2.2 (potato).
> 
> In fact, it seems likely that a 2.2 (potato) packaging of 7.1 should be
> available from somebody else anyhow.  Oliver, do you plan to make the
> woody 7.1 package depend on any other package versions not in potato?
> If not, you can just use the 7.1 package directly on your Debian 2.2
> system.

Oliver Elphick seems awfully busy and once said that 7.1 required a
*lot* of packaging ... Better not bug him right now ...

--
Emmanuel Charpentier

Wed, 17 Jan 2001 22:34:45 +0100
Emmanuel Charpentier <charpent@bacbuc.dyndns.org>
Re: copy from stdin; bug?
FYI, if you would like to build 7.1 with the UTF-8 <--> other
encodings capability, you need to configure --enable-multibyte AND
--enable-unicode-conversion, and that would add a 1MB conversion table
linked to the backend.
--
Tatsuo Ishii

> On Wed, Jan 17, 2001 at 01:40:58AM +0100, Rehak Tamas wrote:
> > 
> > > 3) upgrade to 7.1 that has the capability to do an automatic
> > >    conversion between UTF-8 and ISO-8859-1.
> >
> > i like to use deb packages and to use 7.1 i would have to upgrade
> > to woody (or even sid)...
> 
> Not true.  There are Debian source packages, and taking the source
> package from Debian 2.x, x>2 (woody/sid), you can easily build it 
> on Debian 2.2 (potato).  
> 
> In fact, it seems likely that a 2.2 (potato) packaging of 7.1 should be 
> available from somebody else anyhow.  Oliver, do you plan to make the 
> woody 7.1 package depend on any other package versions not in potato?  
> If not, you can just use the 7.1 package directly on your Debian 2.2 
> system.  
> 
> (Apologies to the rest for the Debian jargon.)
> 
> Nathan Myers
> ncm@zembu.com

Thu, 18 Jan 2001 10:07:47 +0900
Tatsuo Ishii <t-ishii@sra.co.jp>
Re: copy from stdin; bug?
Emmanuel Charpentier wrote:
  >Oliver Elphick seems awfully busy and once said that 7.1 required a
  >*lot* of packaging ... Better not bug him right now ...

I'm working on it at the moment.


-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "For the eyes of the LORD run to and fro throughout the
      whole earth, to show himself strong in the behalf of 
      them whose heart is perfect toward him..."            
                                   II Chronicles 16:9 



Thu, 18 Jan 2001 18:03:04 +0000
"Oliver Elphick" <olly@lfix.co.uk>
Re: copy from stdin; bug? 
On Wed, Jan 17, 2001 at 10:34:45PM +0100, Emmanuel Charpentier wrote:
> Nathan Myers wrote:
> > Not true.  There are Debian source packages, 

> Where are they ? I'm *quite* interested !

> >                                              and taking the source
> > package from Debian 2.x, x>2 (woody/sid), you can easily build it
> > on Debian 2.2 (potato).

They're as near as "apt-get source postgresql", once you have edited 
/etc/apt/sources.list to point to the package repositories you want,
and have run "apt-get update" to synchronize with those repositories.  

Under the best circumstances, "apt-get source -b postgresql" will 
download the sources and build a ".deb" tailored for your system, 
much as in the BSD "ports" system.  (I say "best circumstances"
because the package or the build process may depend on tools and
"-dev" packages you have not "apt-get install"'ed yet, and because
you might prefer to tinker with configuration options before building.)

I'm sure once Oliver has prepared a 7.1 Debian package he will announce
it here.

(This is getting dangerously Debian-specific.)

Nathan Myers
ncm@zembu.com

Thu, 18 Jan 2001 14:27:09 -0800
ncm@zembu.com (Nathan Myers)
Re: copy from stdin; bug?
Dear list,

I have made some progress about the current state of the ODBC drivers.

I have tried three ODBC drivers :

The original ODBC river, as compiled by Oliver Elphick in the Debian
7.1beta4 packages : this one is utterly broken : trying to use it leads
to nothing : no activity is loged neither in syslog nor in postgres.log
with -d2. Nick Gorham says it's because the driver and the driver
manager wait mutually for each other, IIRC.

The same driver patched (how ?) by Nick Gorham has some basic
functionality : it can query the DB in arbitrary ways and is able to do
other basic things. However, it has other problems. It displays only
tables, not views, and has some serious limitations on system tables.

Nick Gorham's unixODBC driver. This ione has only basic functionality :
it can connect and query the backend, but only with a hand-crafted
query. No way to get the list of tables, nor metadata.

In the first case, I can do nothing : I'm reluctant to try to rebuild
the Debian packages from source (I don't kniow how to do this from the
sources and Oliver's patches). It follows that I can't do that for the
second either.

However, the problems exhibited by the second and third drivers are of
the same nature : the SQL queries sent by them to get thje metadata are
no longer valid for 7.1, since the system tables have undergo a lot of
changes.

I will try to fix the third and publish my result and changes, hoping to
see them ported on the first one.

Any thoughs ?

And, BTW, where can I find the docs of the 7.0 system tables ? I know
where the 7.1 docs are ...

Sincerely yours,

					Emmanuel Charpentier

Tue, 27 Feb 2001 22:23:15 +0100
Emmanuel Charpentier <charpent@bacbuc.dyndns.org>
Current ODBC driver(s) problems with 7.1
Emmanuel Charpentier wrote:
  >I have tried three ODBC drivers :
  >
  >The original ODBC river, as compiled by Oliver Elphick in the Debian
  >7.1beta4 packages : this one is utterly broken : trying to use it leads
  >to nothing : no activity is loged neither in syslog nor in postgres.log
  >with -d2. Nick Gorham says it's because the driver and the driver
  >manager wait mutually for each other, IIRC.
  
I have been trying it; I get a segfault (7.1beta4), but haven't yet been
able to determine the cause.  Has anyone got any hints on debugging shared
libraries?

...
  >In the first case, I can do nothing : I'm reluctant to try to rebuild
  >the Debian packages from source (I don't kniow how to do this from the
  >sources and Oliver's patches). It follows that I can't do that for the
  >second either.

I make no changes to the ODBC library.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "The LORD is my shepherd; I shall not want. He maketh 
      me to lie down in green pastures: he leadeth me beside
      the still waters, he restoreth my soul...Surely
      goodness and mercy shall follow me all the days of my
      life; and I will dwell in the house of the LORD for
      ever."                    Psalms 23:1,2,6 



Thu, 01 Mar 2001 20:16:08 +0000
"Oliver Elphick" <olly@lfix.co.uk>
Re: Current ODBC driver(s) problems with 7.1 