pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
problem with _ character
7+ messages / 3 participants
[nested] [flat]

* problem with _ character
@ 2019-02-20 10:42 Pierre Couderc <pierre@couderc.eu>
  2019-02-20 12:44 ` Re: problem with _ character Clemens Ladisch <clemens@ladisch.de>
  2019-02-20 14:47 ` Re: problem with _ character Christophe Garault <christophe@garault.org>
  2019-02-21 10:31 ` Re: problem with _ character Pierre Couderc <pierre@couderc.eu>
  0 siblings, 3 replies; 7+ messages in thread

From: Pierre Couderc @ 2019-02-20 10:42 UTC (permalink / raw)
  To: pgsql-odbc

Hello,

I am using ANSI odbc driver (11.0) on a W10  with a utf8 DB trying to :

SELECT * FROM table WHERE (name = ?);

with a name including a '_' character : '1170332_381-P364'

In the postgresql server logs, I see that it has been replaced with 
'1170332[_]381-P364' and my query fails.

How should I do ?

Thanks.

PC






^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem with _ character
  2019-02-20 10:42 problem with _ character Pierre Couderc <pierre@couderc.eu>
@ 2019-02-20 12:44 ` Clemens Ladisch <clemens@ladisch.de>
  2019-02-20 12:52   ` Re: problem with _ character Pierre Couderc <pierre@couderc.eu>
  2019-02-20 12:53   ` Re: problem with _ character Pierre Couderc <pierre@couderc.eu>
  2 siblings, 2 replies; 7+ messages in thread

From: Clemens Ladisch @ 2019-02-20 12:44 UTC (permalink / raw)
  To: pgsql-odbc@lists.postgresql.org

Pierre Couderc wrote:
> I am using ANSI odbc driver

How exactly?  Are you calling the ODBC API directly in C(++), or are
you using some DB driver from some other language?


Regards,
Clemens




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem with _ character
  2019-02-20 10:42 problem with _ character Pierre Couderc <pierre@couderc.eu>
  2019-02-20 12:44 ` Re: problem with _ character Clemens Ladisch <clemens@ladisch.de>
@ 2019-02-20 12:52   ` Pierre Couderc <pierre@couderc.eu>
  1 sibling, 0 replies; 7+ messages in thread

From: Pierre Couderc @ 2019-02-20 12:52 UTC (permalink / raw)
  To: pgsql-odbc@lists.postgresql.org


On 2/20/19 1:44 PM, Clemens Ladisch wrote:
> Pierre Couderc wrote:
>> I am using ANSI odbc driver
> How exactly?  Are you calling the ODBC API directly in C(++), or are
> you using some DB driver from some other language?
>
>
the ODBC API from cpp.

Thank you.

PC





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem with _ character
  2019-02-20 10:42 problem with _ character Pierre Couderc <pierre@couderc.eu>
  2019-02-20 12:44 ` Re: problem with _ character Clemens Ladisch <clemens@ladisch.de>
@ 2019-02-20 12:53   ` Pierre Couderc <pierre@couderc.eu>
  1 sibling, 0 replies; 7+ messages in thread

From: Pierre Couderc @ 2019-02-20 12:53 UTC (permalink / raw)
  To: pgsql-odbc@lists.postgresql.org


On 2/20/19 1:44 PM, Clemens Ladisch wrote:
> Pierre Couderc wrote:
>> I am using ANSI odbc driver
> How exactly?  Are you calling the ODBC API directly in C(++), or are
> you using some DB driver from some other language?
>
>
the ODBC API from cpp.

It works since years with othe DBs.


Thank you.

PC







^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem with _ character
  2019-02-20 10:42 problem with _ character Pierre Couderc <pierre@couderc.eu>
@ 2019-02-20 14:47 ` Christophe Garault <christophe@garault.org>
  2019-02-20 16:14   ` Re: problem with _ character Pierre Couderc <pierre@couderc.eu>
  2 siblings, 1 reply; 7+ messages in thread

From: Christophe Garault @ 2019-02-20 14:47 UTC (permalink / raw)
  To: Pierre Couderc <pierre@couderc.eu>; +Cc: pgsql-odbc

Hi Pierre,

Place your identifiers between double quotes:
https://www.postgresql.org/docs/9.1/sql-syntax-lexical.html

hth.


Le 20/02/2019 11:42, Pierre Couderc a écrit :
> Hello,
> 
> I am using ANSI odbc driver (11.0) on a W10  with a utf8 DB trying to :
> 
> SELECT * FROM table WHERE (name = ?);
> 
> with a name including a '_' character : '1170332_381-P364'
> 
> In the postgresql server logs, I see that it has been replaced with
> '1170332[_]381-P364' and my query fails.
> 
> How should I do ?
> 
> Thanks.
> 
> PC




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem with _ character
  2019-02-20 10:42 problem with _ character Pierre Couderc <pierre@couderc.eu>
  2019-02-20 14:47 ` Re: problem with _ character Christophe Garault <christophe@garault.org>
@ 2019-02-20 16:14   ` Pierre Couderc <pierre@couderc.eu>
  0 siblings, 0 replies; 7+ messages in thread

From: Pierre Couderc @ 2019-02-20 16:14 UTC (permalink / raw)
  To: pgsql-odbc@lists.postgresql.org


On 2/20/19 3:47 PM, Christophe Garault wrote:
> Hi Pierre,
>
> Place your identifiers between double quotes...

It is not an identifier, it is data, it is the content of a field !








^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem with _ character
  2019-02-20 10:42 problem with _ character Pierre Couderc <pierre@couderc.eu>
@ 2019-02-21 10:31 ` Pierre Couderc <pierre@couderc.eu>
  2 siblings, 0 replies; 7+ messages in thread

From: Pierre Couderc @ 2019-02-21 10:31 UTC (permalink / raw)
  To: pgsql-odbc

On 2/20/19 11:42 AM, Pierre Couderc wrote:
>
> Thanks.
>
It is my mistake, sorry for the noise...




^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2019-02-21 10:31 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 10:42 problem with _ character Pierre Couderc <pierre@couderc.eu>
2019-02-20 12:44 ` Clemens Ladisch <clemens@ladisch.de>
2019-02-20 12:52   ` Pierre Couderc <pierre@couderc.eu>
2019-02-20 12:53   ` Pierre Couderc <pierre@couderc.eu>
2019-02-20 14:47 ` Christophe Garault <christophe@garault.org>
2019-02-20 16:14   ` Pierre Couderc <pierre@couderc.eu>
2019-02-21 10:31 ` Pierre Couderc <pierre@couderc.eu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox