[ic] can't make the inactive/HIDE_FIELD work with 4.9.6

Xin Xu interchange-users@icdevgroup.org
Thu May 29 11:53:01 2003


>I upgraded my interchange from 4.8.7 to 4.9.6, mainly >to take advantage of the HIDE_FIELD feature. I am >using PGSQL as backend and I have not rebuilt the >catalog after the upgrade (Hope that I don’t have to >do that). After I added the following line in the >catalog.cfg
>
>Datebase products HIDE_FIELD inactive
>
>It seems to filter out all records having NULL value, >but showing records where inactive<>NULL (regardless >1 or 0 value). 
>
>I tried to added the following line in >dbconfig/pgsql/products.pgsql
>
>Datebase products COLUMN_DEF “inactive=int default 0”

All right, after a couple of days digging around, I finally figured out the reason for "inactive" not working. The data type of inactive field of products table in pgsql is varchar(128) (it was generated by IC 4.8x a while ago), and the where clause inactive!=1 doesn't seem convert data type expectedly (at least not for pgsql).

Anyway, after converting the database of inactive to int(4), it works fine.

A sugestion: IC should probabaly use int (or tinyint) for inactive field when generating products table in the first place. Maybe it is already done in the later version?

-Xin