Informix 11.5-39->demo->niels_table
Extracting constraints for Informix, uses this query for Primary Keys. Note that the column sequence number is "0 seqno", which means the order of the columns is in the order returned by the database. Informix doesn't seem to have a column to indicate the order of the column in the constraint. We need to research to see if Informix provides the sequence somewhere.
select sc.colname, so.constrname, st.tabname, st.owner, so.constrtype, '' as checktext, 0 seqno, os.state, '' as delrule
from informix.sysconstraints so, informix.sysobjstate os, informix.systables st, informix.sysindexes si, informix.syscolumns sc
where (st.tabname = 'niels_table') and st.tabid = so.tabid and so.idxname = si.idxname
and (so.constrtype = 'P' or so.constrtype = 'U') and sc.tabid = st.tabid and st.owner = 'informix'
and so.tabid = os.tabid and os.objtype = 'C' and os.name = so.constrname and os.owner = so.owner
and (sc.colno = si.part1 or sc.colno = si.part2 or sc.colno = si.part3 or sc.colno = si.part4 or sc.colno = si.part5 or sc.colno = si.part6 or sc.colno = si.part7 or sc.colno = si.part8)
See ExtractConstraint->Line2042.
It is possible to get the order from the index. part# where # is from 1-16 contains the sequence of the columns. need to extract and create some code to decipher the order and assign it to the columsn for primary, unique and foriend keys. Starting code changes
Informix - All versions
Constraint Extraction queries modified.
Code added to correctly order constraint column sequence for unique, primary and foreign keys.
Changes checked in to 10.0 branch -- Committed revision: 23752
Informix - All versions
Constraint Extraction queries modified.
Code added to correctly order constraint column sequence for unique, primary and foreign keys.
Changes checked in to 10.0 branch -- Committed revision: 23752
Issue #6117 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 10.0.1 |
No time estimate |
It is possible to get the order from the index. part# where # is from 1-16 contains the sequence of the columns. need to extract and create some code to decipher the order and assign it to the columsn for primary, unique and foriend keys. Starting code changes