Postgres and data type text issue


#1

Hi Gurus,

I have a Postggres field as a data type of text that is used to hold
some configuration information in ini file format. This is a legacy
application db. The current requirement is for the text field to be
null-terminated at the end.

I get a failure when I try to perform the save with a null-termination
in the SQL VALUES statement. Without the NULL termination the save works
fine.

Am I getting the error because the postgres-pr or abstract driver thinks
this is a SQL injection type attack or because the log method gets
balled up on the null? What is the easiest way to debug this stuff?

Any information is appreciated. The error message is as follows:

ArgumentError: Invalid Ruby/cstring: INSERT INTO

Ths stack:
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/connection_adapters/abstract_adapter.rb:128:in
log' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/connection_adapters/postgresql_adapter.rb:152:inexecute’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/connection_adapters/postgresql_adapter.rb:136:in
`insert’

Any insight is appreciated,
Rick