postgresql-simple icon indicating copy to clipboard operation
postgresql-simple copied to clipboard

FromField and ToField for anonymous Postgres records?

Open michalrus opened this issue 8 years ago • 2 comments

Hello!

How can I make (a, b) == (1, 2) in

[Only (a, b)] <- query_ c "select (1, 2)"

? This (1,2) is:

psql=> select (1,2);
  row  
-------
 (1,2)
(1 row)

Thank you!

michalrus avatar Dec 09 '17 13:12 michalrus

This is something that does eventually need to get implemented. I don't think it is possible to have the same level of type-checking as the rest of postgresql-simple, though.

lpsmith avatar Aug 13 '18 18:08 lpsmith

This would be very useful for something I'm doing in Opaleye. Could anyone give me a clue how to get started?

tomjaguarpaw avatar Aug 11 '20 09:08 tomjaguarpaw