On Friday 12 December 2008 16:02:47 entropy wrote:
> Hi,
>
> I'm using Sequel directly from Jeremy Evan's github repository (as at
> 2.8.0) and
>
> I have the following code:
>
>       Model::Note.create(
>
>         :creator => person,
>         :created => 'NOW()'.lit,
>         :content => "I'm broken" )
>
> Shouldn't the apostrophe be escaped?
>
> I get the following error:
>
> ERROR C42601  Msyntax error at or near "m"    P76     Fscan.l L807
> Rbase_yyerror
>   c:/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.5.0/lib/postgres-pr/
> connection.rb:142:in `query'
>   c:/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.5.0/lib/postgres-pr/
> postgres-compat.rb:33:in `async_exec'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/adapters/postgres.rb:137:in `execute'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/adapters/postgres.rb:229:in `execute'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/connection_pool.rb:109:in `hold'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/database.rb:361:in `synchronize'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/adapters/postgres.rb:229:in `execute'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/dataset.rb:464:in `execute'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/adapters/postgres.rb:315:in `fetch_rows'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/dataset.rb:454:in `_each'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/dataset.rb:204:in `each'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/dataset/convenience.rb:180:in `single_record'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_core/adapters/shared/postgres.rb:469:in `insert_select'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_model/record.rb:206:in `save!'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_model/record.rb:191:in `save'
>   c:/local/repositories/github.com/clivecrous/scribbl/vendor/sequel/
> lib/sequel_model/base.rb:111:in `create'
>
>
> 
I don't have postgres-pr installed anymore to test this, but it is probably 
your problem. Use the 'pg' gem and you should be just fine.

spox

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to