Re: show value of backslashes in string array argument

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: "Sabin Coanda" <sabin(dot)coanda(at)deuromedia(dot)ro>
Subject: Re: show value of backslashes in string array argument
Date: 2007-11-12 10:20:54
Message-ID: 200711121220.54516.achill@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Στις Δευτέρα 12 Νοέμβριος 2007 11:51, ο/η Sabin Coanda έγραψε:
> I fond another collateral problem, because there are the different
> convention to describe a varchar array item which contains backslashes,
> when standard_conforming_strings = 'on'
>
> For instance, to get a string composed by just one character backslash I
> can use any of the two forms:
>
> SELECT ARRAY[ '\' ]::varchar[];
>
> or
>
> SELECT '{\\}'::varchar[];
>
> On the other hand, standard_conforming_strings = 'on' let me use varchar
> items with '\' format. So the first format seems to be aware of
> standard_conforming_strings = 'on', but the second is not.
>
> My problem is that the java driver build arrays using the second format,
> but the driver seems to be aware of standard_conforming_strings = 'on'.
> This make inconsistence using the statement parameters, because to get the
> same thing in the database I have to initialize a varchar parameter with a
> string of one backslashes, but a varchar array item has to be initialized
> with a string of two backslashes.
>
> Sabin

I would recommend:

a) Move to Unix
b) Subscribe to pgsql-jdbc(at)postgresql(dot)org

>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate

--
Achilleas Mantzios

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Sabin Coanda 2007-11-12 11:10:50 Re: plpgsql language not aware of standard_conforming_strings ?
Previous Message Sabin Coanda 2007-11-12 10:20:19 plpgsql language not aware of standard_conforming_strings ?