In the sorting code, I need to determine the datatype of my sort keys and call some code conditionally based on the datatype. Is there any way to determine the datatype of a column from the backend PostGreSQL code. is the datatype of the column available in the plan? Any help on this would be very much appreciated.