rdb$field_sub_type for numeric computed column ----------------------------------------------
Key: DNET-423 URL: http://tracker.firebirdsql.org/browse/DNET-423 Project: .NET Data provider Issue Type: Bug Components: ADO.NET Provider Affects Versions: 2.7 Reporter: Jiri Cincura Assignee: Jiri Cincura Priority: Minor Directly from my thread "Wrong rdb$field_sub_type for numeric computed column" in firebird-devel: === have a table: recreate table test ( base numeric(15,4), test1 computed by (base+base), test2 computed by (cast(base+base as numeric(15,4))), foo bigint, bar numeric(15,4) ); If I run the query: select rf.RDB$FIELD_NAME, f.RDB$FIELD_SCALE, f.RDB$FIELD_TYPE, f.RDB$FIELD_SUB_TYPE from RDB$RELATION_FIELDS rf inner join RDB$FIELDS f on (rf.RDB$FIELD_SOURCE = f.RDB$FIELD_NAME) where rf.RDB$RELATION_NAME = 'TEST' it reports: BASE -4 16 1 TEST1 -4 16 0 TEST2 -4 16 1 FOO 0 16 0 BAR -4 16 1 Why is rdb$field_sub_type for test1 column "0"? Then it looks like bigint. Checking the rdb$field_scale could be a solution, but is it then numeric or decimal? === I'm happy with conclusion that if field_scale is < 0 and no particular sub_type, imply i.e. numeric. Probably somebody from core devs should tell us. === That is what is done in Jaybird right now. See getDataType(...) and getDataTypeName(...) in http://firebird.cvs.sourceforge.net/viewvc/firebird/client-java/src/main/org/firebirdsql/jdbc/AbstractDatabaseMetaData.java?view=markup -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider