Here is the complete bugfix:
1. src/slon/remote_worker.c
- slon_mkquery(&query1, dest);
+ slon_mkquery(&query1, "%s", dest);
2. src/slonik/slonik.c
- slon_mkquery(&query, dest);
+ slon_mkquery(&query, "%s", dest);
I checked all other places where slon_mkquery() is called, they are OK.
Except these two, of course.
Please include this in the next release (possibly - in critical fix release,
because the bug is very dangerous and implicit).
On 6/28/07, Dmitry Koterov <[EMAIL PROTECTED]> wrote:
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?
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general