[prev in list] [next in list] [prev in thread] [next in thread]
List: slony1-general
Subject: [Slony1-general] Backslashes inside an update statement for slonik
From: "Dmitry Koterov" <dmitry () koterov ! ru>
Date: 2007-06-28 19:02:41
Message-ID: d7df81620706281202h10ac8986h45d31cffbcdf6a78 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hello.
I feed the slonik with the following SQL:
DDL Statement 2: (299,471) [
CREATE UNIQUE INDEX "i_dictionary_uni_abbr" ON "static"."dictionary"
USING btree ((substring(dic_russian, E'^([^(]*[^( ]) *\\('::text)))
WHERE (dic_category_id = 26);
] DDL Statement failed - PGRES_FATAL_ERROR
You see, it generates an error. Here is a portion of postgres logs:
2007-06-28 18:56:55 GMT 87.250.244.99(55965)ERROR: invalid regular
expression: parentheses () not balanced
2007-06-28 18:56:55 GMT 87.250.244.99(55965)STATEMENT:
CREATE UNIQUE INDEX "i_dictionary_uni_abbr" ON "static"."dictionary"
USING btree ((substring(dic_russian, E'^([^(]*[^( ]) *\('::text)))
WHERE (dic_category_id = 26);
Note the \\( part above: it is sent to the server as \(.
Seems slonik replaces \\ by \ before sending it to postgres?
[Attachment #5 (text/html)]
Hello.<br><br>I feed the slonik with the following SQL:<br><br>DDL Statement 2: \
(299,471) [<br><br>CREATE UNIQUE INDEX "i_dictionary_uni_abbr" ON \
"static"."dictionary"<br> USING btree \
((substring(dic_russian, E'^([^(]*[^( ]) *\\('::text))) <br> WHERE \
(dic_category_id = 26);<br><br>] DDL Statement failed - \
PGRES_FATAL_ERROR<br><br><br>You see, it generates an error. Here is a portion of \
postgres logs:<br><br>2007-06-28 18:56:55 GMT 87.250.244.99(55965)ERROR: \
invalid regular expression: parentheses () not balanced <br>2007-06-28 18:56:55 GMT \
87.250.244.99(55965)STATEMENT:<br> CREATE \
UNIQUE INDEX "i_dictionary_uni_abbr" ON \
"static"."dictionary"<br> \
USING btree ((substring(dic_russian, E'^([^(]*[^( ]) *\('::text))) \
<br> WHERE (dic_category_id = \
26);<br><br><br>Note the \\( part above: it is sent to the server as \(.<br>Seems \
slonik replaces \\ by \ before sending it to postgres?<br>
_______________________________________________
Slony1-general mailing list
Slony1-general@lists.slony.info
http://lists.slony.info/mailman/listinfo/slony1-general
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic