So apparently the documentation for how to use PGRow is wrong.
I got the NoMethodError resolved by extending the Database object instead 
of Sequel:

Sequel::Model.db.extension :pg_row

Also, it seems like calling register_row_type on the same type will 
overwrite the previously registered row type definition. I'm not sure if 
there are memory leak worries, since the implementation looks like it 
creates an anonymous class for every row type registration.

Now the problem remains of making row types only visible to a certain 
database connection for thread/transactional safety. Right now, registering 
a changed row type is not thread safe since it modifies the row type 
registration on the Database object, which is shared among threads (a 
thread inside a transaction will see a new row type in Rubyland even though 
the database session doesn't see the new row type since it's inside a 
transaction).

Any tips on how I might make row type in Rubyland correspond with the row 
type definition visible inside the connection session?

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/dWk0gmdP_ZIJ.
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