FoundationDB/sql-layer — pull request #1128 by MMcM (2013-12-25 04:11:33+00:00)
Title: Track TInstance in plan parameters

It is proving difficult to break up the last part of the Types elimination into smaller pieces. This one is separable, but not obviously motivated until the larger branch.

Keep track of the TInstance computed for parameters as well as the DataTypeDescriptor. Make sure that this is used in computing the PostgresType.

This also lays the groundwork for using the client-supplied type (which matters when the user does setTimestamp on a Date column, say). But that cannot be put in place until there is a uniform way to get a "neutral" type given just the TClass. For instance, a DECIMAL with enough places to hold whatever is sent, a wide VARCHAR with no collation, etc.