Example:
create row type custom_type string(street VARCHAR(20), city VARCHAR(20); getDDl(custom_type);
I think the server should store information about row type fields. However, I did not find information about fields or ddl type in the system tables. The documentation says - Field Definition clause defines an ordered list of the data types. But at the moment I couldn't find where this list is stored. Does Informix store information about row type fields anywhere?
The syntax given in the example appears to be incorrect, or at least is not recognized by an Informix server. If it is rewritten as:
then it will be accepted as valid by Informix.
The command
dbschema -d <database> -u allmay be used to obtain the definition of the row type. Unlike other options of thedbschemacommand, only the keywordallmay be used to obtain information about all user-defined data types. It is not possible to use the name of a specific row type.Internally, the information relating to row types is stored in the SYSXTDTYPES and SYSATTRTYPES system catalog tables. An example query to retrieve this information:
This provides the output:
Refer to the documentation for the SYSATTRYPES system catalog for details of how to interpret the stored information.