lpsmith / postgresql-simple

Mid-level client library for accessing PostgreSQL from Haskell
Other
206 stars 71 forks source link

FromField and ToField for anonymous Postgres records? #238

Open michalrus opened 6 years ago

michalrus commented 6 years ago

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!

lpsmith commented 5 years ago

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.

tomjaguarpaw commented 3 years ago

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