Re: [SQL] Unicode problem inserting records - Invalid UNICODE character

2004-11-12 Thread Richard Huxton
David B wrote:
show client_encoding gives:
UNICODE
databases reads:
DATABASE   OWNER ENCODING
OK - with the same settings here, I start psql and do:
\i unicode_import_test.txt
I get:
CREATE TABLE
t
-
 AAA
 À È Ð Ø
 ZZZ
(3 rows)
In case this gets garbled by my email, the middle line contains four 
accented characters, with accents as follows: A` E` D- O/

Actually, this doesn't display properly in my usual terminal (konsole 
under KDE) but does under xterm.
--
  Richard Huxton
  Archonet Ltd
CREATE TABLE foo (t text);

-- DELETE FROM foo;

COPY foo FROM STDIN;
AAA
À È Ð Ø
ZZZ
\.

SELECT * FROM foo;

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [SQL] Unicode problem inserting records - Invalid UNICODE

2004-11-12 Thread Markus Schaber
Hi, David,

On Thu, 11 Nov 2004 11:29:22 -0800
"David B" <[EMAIL PROTECTED]> wrote:

> show client_encoding gives:
> UNICODE

So is the data you send also encoded in unicode?

Maybe "set client_encoding latin1" or "\encoding latin1" helps.

HTH,
markus


-- 
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:[EMAIL PROTECTED] | www.logi-track.com

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


[SQL] TEXT::CIDR/INET::CIDR output confusion

2004-11-12 Thread Alexander M. Pravking
It looks a bit strange that CIDR output depends on datatype it has been
casted from:

fduch=# SELECT '1.1.1.1'::cidr;
cidr

 1.1.1.1/32
(1 row)

fduch=# SELECT '1.1.1.1'::inet::cidr;
  cidr
-
 1.1.1.1
(1 row)


However these two seem to be 'equal' in terms of backend:

fduch=# SELECT '1.1.1.1'::inet::cidr = '1.1.1.1'::inet;
 ?column?
--
 t
(1 row)

fduch=# SELECT '1.1.1.1'::inet::cidr = '1.1.1.1'::cidr;
 ?column?
--
 t
(1 row)


I'm just curious how can it even be...

fduch=# SELECT version();
version

 PostgreSQL 7.4.5 on i386-portbld-freebsd5.3, compiled by GCC cc (GCC) 3.4.2 
[FreeBSD] 20040728


-- 
Fduch M. Pravking

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[SQL] anounce

2004-11-12 Thread Kenneth Gonsalves
pls check this out:

http://linux-bangalore.org/2004/talks/shortlist1.php

kg

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match