[Nitro] Latest darcs pull gives errors on postgresql

Bill Kelly billk at cts.com
Mon Aug 27 14:46:59 EDT 2007


Hi,

After doing a darcs pull, my Nitro app now gets the following error:

DEBUG: SELECT nextval('"ogproduct"_oid_seq')
ERROR: DB error ERROR:  invalid name syntax
, [SELECT nextval('"ogproduct"_oid_seq')]


It's happening in: og/lib/og/adapter/postgresql.rb

  def insert(klass, inserts)
    next_oid = nil

    if !inserts[klass.primary_key] || inserts[klass.primary_key] == "NULL"
      if seq = klass.ann(klass.primary_key, :sequence)

 # ^^^^^^^^^^^^^^^^ seq looks like `"ogproduct"_oid_seq'` here

        next_oid = Integer(query("SELECT nextval('#{seq}')").first_value)
        inserts[klass.primary_key] = write_attr(next_oid, :class => Integer)
      end
    end
    super

    return next_oid
  end


I saw a patch related to table name quoting, so I guess this
is related?


Regards,

Bill




More information about the Nitro-general mailing list