You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although we do need to fix some things, PostgresType will not express precision/scale.
PostgresType corresponds to an actual PostgreSQL type (a row in pg_type). The different facts (precision, scale, length) aren't part of the type, but in PostgreSQL are part of the "type modifier", which is an additional int encoding extra facet data about a type. The typmod is configured on a column and is also returned as part of every resultset's RowDescription, but is distinct from the actual type (and is interpreted based on the type). To summarize, varchar(2) and varchar(3) both have the same type (in the sense of the same type OID in pg_type, and therefore the same PostgresType instance), but they have different type modifiers.
For #1919, the idea is to fix NpgsqlDataReader.GetDataTypeName() to look at both the type and the type modifier (which is is currently ignored by that method), producing the correct full type name.
Activity
roji commentedon May 9, 2018
Although we do need to fix some things, PostgresType will not express precision/scale.
PostgresType corresponds to an actual PostgreSQL type (a row in pg_type). The different facts (precision, scale, length) aren't part of the type, but in PostgreSQL are part of the "type modifier", which is an additional int encoding extra facet data about a type. The typmod is configured on a column and is also returned as part of every resultset's RowDescription, but is distinct from the actual type (and is interpreted based on the type). To summarize,
varchar(2)andvarchar(3)both have the same type (in the sense of the same type OID in pg_type, and therefore the same PostgresType instance), but they have different type modifiers.For #1919, the idea is to fix
NpgsqlDataReader.GetDataTypeName()to look at both the type and the type modifier (which is is currently ignored by that method), producing the correct full type name.