
+ "cast(ISGMT.RDB$FIELD_NAME as varchar(31)) as COLUMN_NAME,"
</BUG>
+ "CAST((ISGMT.RDB$FIELD_POSITION + 1) as SMALLINT) as KEY_SEQ,"
<BUG>+ "cast(RC.RDB$CONSTRAINT_NAME as varchar(31)) as PK_NAME "
</BUG>
+ "from "
+ "RDB$RELATION_CONSTRAINTS RC "
+ "INNER JOIN RDB$INDEX_SEGMENTS ISGMT ON RC.RDB$INDEX_NAME = ISGMT.RDB$INDEX_NAME "
<BUG>+ "where CAST(RC.RDB$RELATION_NAME AS VARCHAR(40)) = ? and "
</BUG>
+ "RC.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY' "

.at(7).simple(SQL_SHORT, 0, "PSEUDO_COLUMN", "VERSIONCOL").addField()
.toRowDescriptor();
return new FBResultSet(rowDescriptor, Collections.<RowValue>emptyList());
}
private static final String GET_PRIMARY_KEYS = "select "
+ "cast(RC.RDB$RELATION_NAME as varchar(" + OBJECT_NAME_LENGTH + ")) as TABLE_NAME,"
+ "cast(ISGMT.RDB$FIELD_NAME as varchar(" + OBJECT_NAME_LENGTH + ")) as COLUMN_NAME,"
+ "CAST((ISGMT.RDB$FIELD_POSITION + 1) as SMALLINT) as KEY_SEQ,"
+ "cast(RC.RDB$CONSTRAINT_NAME as varchar(" + OBJECT_NAME_LENGTH + ")) as PK_NAME "
+ "from "
+ "RDB$RELATION_CONSTRAINTS RC "
+ "INNER JOIN RDB$INDEX_SEGMENTS ISGMT ON RC.RDB$INDEX_NAME = ISGMT.RDB$INDEX_NAME "
+ "where CAST(RC.RDB$RELATION_NAME AS VARCHAR(" + (OBJECT_NAME_LENGTH + 10) + ")) = ? and "
+ "RC.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY' "
