× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
NielsGron reported 2011-10-08T01:43:43Z  · last modified 2011-10-10T23:46:30Z

Scripting compound primary key on Informix can script the columns in the incorrect order


Priority Low
Complexity Unknown
Component App - Schema Browser
Version 10.0

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.

 

Issue #6117

Closed
Fixed
Resolved 2011-10-10T19:08:05Z
 
 
Completion
No due date
Fixed Build 10.0.1
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017