[ic] Options table with Postgresql & 4.9.7

Brian Kosick interchange-users@icdevgroup.org
Fri Apr 4 14:28:01 2003


Kevin Old wrote:

>Hello everyone,
>
>I'm playing around with 4.9.7 and am getting the following error when
>just trying to setup a demo store with Postgresql 7.2.1.
>Configuring catalog foundationdb...Using PostgreSQL,
>DSN=dbi:Pg:dbname=foundationdb...NOTICE:  CREATE TABLE / PRIMARY KEY
>will create implicit index 'options_pkey' for table 'options'
>table options created: create table options ( 
>code varchar(64) primary key NOT NULL,
>sku varchar(64),
>o_group varchar(20),
>o_sort varchar(16),
>o_default varchar(64),
>o_label text,
>o_value text,
>o_widget text,
>o_height int,
>o_width int,
>description text,
>price varchar(20),
>wholesale varchar(20),
>display_type text
>)
>
>DBI: Post creation query 'CREATE  INDEX options_o_enable ON options
>(o_enable)' failed: ERROR:  DefineIndex: attribute "o_enable" not found
>DBI: Post creation query 'CREATE  INDEX options_o_master ON options
>(o_master)' failed: ERROR:  DefineIndex: attribute "o_master" not found
>table 'options' failed: options import failed: ERROR:  value too long
>for type character varying(20)
>
>I have Postgres working with 4.9.6 and I even copied over the
>options.pgsql file from my 4.9.6 dist, did a diff and tried to build the
>table.
>
>What's happening is that the sql statement doesn't include the o_enable
>and o_master fields.....even though they're explicitly defined in in the
>options.pgsql file.
>
>Any ideas?
>
>Kevin
>
>  
>
The problem is not interchange, but with postgres.  as of 7.2 the 
default behavior of postgres has changed.  From truncating text when it 
is too long to fit in the field to rejecting the transaction.  The 
solution is to bump up the VARCHAR length in the <tablename>.pgsql 
file.  This has all ready been documented on the list before.