Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread
Message: 66843
BY: David Evans (dfevans)
DATE: 2009-03-26 11:07
SUBJECT: Quoting and the Postgres DBD

 

Hi, all.

d = DBI.connect('DBI:Pg:...', ...)
d.quote('foo')

should work, yes? It doesn't:

irb(main):010:0> d.quote('foo')
NoMethodError: undefined method `quote' for #<DBI::DBD::Pg::Database:0x101ed74>

but this does:

irb(main):011:0> DBI::DBD::Pg.quote('foo')
=> "E'foo'"

Should DBI::DBD::Pg#quote move into DBI::DBD::Pg::Database? I haven't tried with other DBDs; can file a bug report if appropriate.

DBI version 0.4.1, the pg DBD is 0.3.7.

Cheers!


Thread View

Thread Author Date
Quoting and the Postgres DBDDavid Evans2009-03-26 11:07
      RE: Quoting and the Postgres DBDErik Hollensbe2009-03-26 16:21
            RE: Quoting and the Postgres DBDMike Pomraning2009-03-27 03:24
      RE: Quoting and the Postgres DBDAndrew R Jackson2009-04-02 21:18
            RE: Quoting and the Postgres DBDAndrew R Jackson2009-04-02 22:11

Post a followup to this message