Major Problem with locale
Hi All
I posted a message about regex pattern matching using hebrew letters.
as no one answered me i reinstalled postgress thoug now i compiled it from
source using --enable-locale
then i did export LANG=he_IL and initdb.
what was diffrent then ver 7.1.3 was that initdb (7.2.2) didnt answered me
with the message that locale reduce speed.
how can i know that my db using specific locale ?
what cab be the couse that "l_name ~* '[[:<:]](xyz)[[:>:]]'" dont work for
some of the hebrew characters ?
Please help, i must resolve this problem.
--- Ben-Nes Michael <miki@canaan.co.il> wrote:
Hi All
I posted a message about regex pattern matching
using hebrew letters.
If all else fails, and you really want to use regular
expressions, you can "import" the regular expression
capability of a Procedural Language, like:
create or replace function perl_match(text, text)
returns boolean as '
if ($_[0] =~ m/$_[1]/) {return true}
else {return false};
' language 'plperl';
jeck=# select perl_match('a','\\x61');
perl_match
------------
t
(1 row
Note the need to double the backslashes.
Using hex (or octal) escapes will enable you to match
any ascii character. I don't believe that PostgreSQL
regular expressions support this (at least, I couldn't
get it to work).
Perl 5.6 also supports unicode, although I don't know
how that is implemented for regular expression matching.
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
what i should patch ?
postgres files or maybe something else ?
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Ben-Nes Michael" <miki@canaan.co.il>
Cc: "postgres" <pgsql-general@postgresql.org>
Sent: Monday, September 30, 2002 8:44 PM
Subject: Re: [GENERAL] Major Problem with locale
"Ben-Nes Michael" <miki@canaan.co.il> writes:
what was diffrent then ver 7.1.3 was that initdb (7.2.2) didnt answered
me
with the message that locale reduce speed.
7.2's initdb is a bit broken in this respect --- you won't see that
message unless you use -d (in which case you'll have to dig through
about 4meg worth of debug chatter :-(). This is repaired again for
7.3, though.how can i know that my db using specific locale ?
See contrib/pg_controldata if you want to be sure.
what cab be the couse that "l_name ~* '[[:<:]](xyz)[[:>:]]'" dont work
for
Show quoted text
some of the hebrew characters ?
Perhaps the regex support is missing info about this particular locale.
Feel free to send in a patch, if so ...regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Postgres supports concat with the ||
so you can do the following
Select first_name||' '||last_name AS full_name FROM users;
HTH
On Tue, 1 Oct 2002, Dan Ostrowski wrote:
Does postgres support the "concat" functionality? I looked in the
interactive docs but couldn't find it... i am still looking but if you
know one way or the other could you tell me?I am just checking for compatiblity... i want to "SELECT
CONCAT(table.somefield,' ',table.somefield) AS FullName FROM table"is this supported or do you use another notation.
thanks very much all..
dan---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
--
Darren Ferguson
Import Notes
Reply to msg id not found: 3D9A2D51.9040900@triad-dev.com | Resolved by subject fallback
Does postgres support the "concat" functionality? I looked in the
interactive docs but couldn't find it... i am still looking but if you
know one way or the other could you tell me?
I am just checking for compatiblity... i want to "SELECT
CONCAT(table.somefield,' ',table.somefield) AS FullName FROM table"
is this supported or do you use another notation.
thanks very much all..
dan