Re: [BUGS] BUG #4257: about unicode extend
very sorry, is i wrong.. the version is 8.0.15. i just copyed from wrong of server-terminal window.. -_-! thank you for help. arli Michael Fuhr wrote: On Sat, Jun 21, 2008 at 01:25:15PM +, arli weng wrote: PostgreSQL version: 8.3 What does "SELECT version()" return? I'm wondering if the server isn't 8.3 but rather an earlier version (see below). the command (chinese by utf-8): INSERT INTO "title" VALUES(46307243,46307898,'酋鼠𪕨'); in sqlite text type, no problem.. in postgres report error: invalid byte sequence for encoding "UNICODE": 0xf0 Your INSERT statement works for me in 8.3.3, 8.2.9, and 8.1.13. According to the release notes version 8.1 changed UNICODE to UTF8 and added support for 4-byte characters, so the fact that the error says "UNICODE" and your database doesn't appear to support 4-byte characters makes me wonder if you're running 8.0 or earlier. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #4024: xpath() results lose namespace mappings
Would someone please comment on this bug report from March, 2008? --- Matt Magoffin wrote: > > The following bug has been logged online: > > Bug reference: 4024 > Logged by: Matt Magoffin > Email address: [EMAIL PROTECTED] > PostgreSQL version: 8.3.0 > Operating system: OS X 10.5, Windows XP > Description:xpath() results lose namespace mappings > Details: > > I was trying to extract XML fragments within a pl/pgsql function by nested > xpath() function calls, and found that when namespaces are used in the > XML, only the first xpath() call is able to correctly use namespaces. > > First here is an example that works, when no namespaces are used: > > BEGIN; > CREATE TEMPORARY TABLE tmp_xpath_test (x xml) ON COMMIT DROP; > INSERT INTO tmp_xpath_test VALUES ( > 'bar1bar2'::xml); > SELECT (xpath('/foo/bar[1]', t.x))[1] FROM tmp_xpath_test t; > SELECT xpath('/bar/@x', (xpath('/foo/bar[1]', t.x))[1]) FROM > tmp_xpath_test t; > COMMIT; > > The first select is just there to show the result of the inner call to > xpath() in the second select, and the second select returns: > > SELECT xpath('/bar/@x', (xpath('/foo/bar[1]', t.x))[1]) FROM > tmp_xpath_test t; > xpath > --- > {y} > (1 row) > > Now if I use XML with namespaces, the first SELECT works, but the second > never returns the expected results: > > BEGIN; > CREATE TEMPORARY TABLE tmp_xpath_test (x xml) ON COMMIT DROP; > INSERT INTO tmp_xpath_test VALUES ( > 'bar1 x="y">bar2'::xml); > SELECT (xpath('/a:foo/a:bar[1]', t.x, ARRAY[ARRAY['a','a:urn']]))[1] FROM > tmp_xpath_test t; > SELECT xpath('/a:bar/@x', (xpath('/a:foo/a:bar[1]', t.x, > ARRAY[ARRAY['a','a:urn']]))[1], > ARRAY[ARRAY['a','a:urn']]) FROM tmp_xpath_test t; > COMMIT; > > The select results are > > SELECT (xpath('/a:foo/a:bar[1]', t.x, ARRAY[ARRAY['a','a:urn']]))[1] FROM > tmp_xpath_test t; > xpath > --- > bar1 > (1 row) > > SELECT xpath('/a:bar/@x', (xpath('/a:foo/a:bar[1]', t.x, > ARRAY[ARRAY['a','a:urn']]))[1], > lms_kia(> ARRAY[ARRAY['a','a:urn']]) FROM tmp_xpath_test t; > xpath > --- > {} > (1 row) > > For the second select, I expected a single XML text node containing "y", > just like from the no-namespace result. > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs -- Bruce Momjian <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #4257: about unicode extend
On Sat, Jun 21, 2008 at 01:25:15PM +, arli weng wrote: > PostgreSQL version: 8.3 What does "SELECT version()" return? I'm wondering if the server isn't 8.3 but rather an earlier version (see below). > the command (chinese by utf-8): > INSERT INTO "title" VALUES(46307243,46307898,'酋鼠𪕨'); > > in sqlite text type, no problem.. > in postgres report error: > > invalid byte sequence for encoding "UNICODE": 0xf0 Your INSERT statement works for me in 8.3.3, 8.2.9, and 8.1.13. According to the release notes version 8.1 changed UNICODE to UTF8 and added support for 4-byte characters, so the fact that the error says "UNICODE" and your database doesn't appear to support 4-byte characters makes me wonder if you're running 8.0 or earlier. -- Michael Fuhr -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #4257: about unicode extend
"arli weng" <[EMAIL PROTECTED]> writes: > the command (chinese by utf-8): > INSERT INTO "title" VALUES(46307243,46307898,'é é¼ ðª¨'); > in postgres report error: > invalid byte sequence for encoding "UNICODE": 0xf0 I don't believe this is actually an 8.3 server. In 8.1 or later that encoding would be referred to as "UTF8"; also, 8.1 and later would show all bytes of the complained-of character not just the first one. 8.0 and before only support 16-bit Unicode code points (ie, 3-byte utf8 sequences). We have support for 4-byte sequences in 8.1 and later. Also, there were some fixes in this area in Jan 2007, so whichever branch you use, make sure you get a minor release that's newer than that. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #4257: about unicode extend
The following bug has been logged online: Bug reference: 4257 Logged by: arli weng Email address: [EMAIL PROTECTED] PostgreSQL version: 8.3 Operating system: gentoo linux Description:about unicode extend Details: the command (chinese by utf-8): INSERT INTO "title" VALUES(46307243,46307898,'酋鼠𪕨'); in sqlite text type, no problem.. in postgres report error: invalid byte sequence for encoding "UNICODE": 0xf0 the 𪕨 char is unicode extend b, by utf-8 format, the hex code is "f0 aa 95 a8", because unicode extend b, must start by 0xf0 but postgres cannot support it? server/database/client encoding has unicode already. help me pls, because i love postgres.. and sorry my english -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] bug
-- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs