Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

informix maximum length primary key

Status
Not open for further replies.

loginStd

Programmer
Jan 17, 2005
1
IT
HI,

I would create the following table on Informix 9.4:

create table table_client_mappings (
principal integer not null,
sync_source varchar(128) not null,
luid varchar(200) not null,
guid varchar(200) not null,

primary key (principal,sync_source,luid,guid)
constraint pk_clientmapping
);

but the creation of the pk_clientMapping constraint fails because it exceeds the maximum key length.

How could I create the table with that PK?
Is there a max length for PK?

Thanks in advance
Luigia
 
From the manual

You can include up to 16 columns in a composite index. The total width of all
indexed columns in a single CREATE INDEX statement cannot exceed
255 bytes. ¨
XPS
 
Actually looks like 390 bytes is the limit.

A composite index can have up to 16 key parts. An index key part is either a
table column or the result of a user-defined function on one or more table
columns. A composite index can have any of the following items as an index
key:
n One or more columns
n One or more values that a user-defined function returns (referred to
as a functional index)
n A combination of columns and user-defined functions
The total width of all indexed columns in a single CREATE INDEX statement
cannot exceed 390 bytes. ¨
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top