pgo icon indicating copy to clipboard operation
pgo copied to clipboard

Getting field information in decode_fun/2 when no rows are returned

Open bryanhughes opened this issue 3 years ago • 0 comments

Is it possible to get the field information when no matching rows are returned. For example, selecting an empty table and providing the decode fun? decode_fun/2 provides a nice opportunity to describe a query but unfortunately it does not get called because of the receive_loop0/6 that matches on #no_data{} . When using psql (as well as other drivers like Go and Java) it returns the column names at minimum.

I am poking around the pgo_protocol.erl code, but am having a hard time tracking the DecodeOpts.

bryanhughes avatar Mar 23 '21 23:03 bryanhughes