Dmitry Koterov dmitry at koterov.ru
Thu Jul 5 07:51:29 PDT 2007
I think this bug is easily reproducible, we just need to feed some text with
backslashes to slonik and then - watch all machines log to be sure that
double slashes are incorrectly stripped.

On 6/28/07, Dmitry Koterov <dmitry at koterov.ru> 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 =3D 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 =3D 26);
>
>
> Note the \\( part above: it is sent to the server as \(.
> Seems slonik replaces \\ by \ before sending it to postgres?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20070705/=
6e897f94/attachment.htm


More information about the Slony1-general mailing list