[ic] Postgres oddities part 2

Rene Hertell interchange at hertell.com
Wed Feb 14 20:36:46 EST 2007


Hi all,

I just discovered a strange thing with a table that was created into 
Postgres by IC. I have a fields that i have defined as varchar, and 
logically they should be created a varchar. But after noticing that my 
sku-field was filled up with trailing spaces, i did a check and found 
out that that this field (and a couple of other) where created as a 
char(64) instead of varcahar(64).

It looks that this has to do IC is creating a locale-specific table, 
like products_fi_FI. the normal products table is created correctly


Here are my definitions, and the output when IC created that table:

Database  products  products.txt __SQLDSN__
Database  products  DEFAULT_TYPE varchar(128)
Database  products  KEY          sku
Database  products  HIDE_FIELD   inactive
Database  products  COLUMN_DEF   "sku=varchar(64) NOT NULL PRIMARY KEY"
Database  products  COLUMN_DEF   "description=varchar(128)"
Database  products  COLUMN_DEF   "title=varchar(128)"
Database  products  COLUMN_DEF   "comment=text"
Database  products  COLUMN_DEF   "thumb=varchar(128)"
Database  products  COLUMN_DEF   "image=varchar(64)"
Database  products  COLUMN_DEF   "price=varchar(12)"
Database  products  COLUMN_DEF   "category=varchar(64)"
Database  products  COLUMN_DEF   "nontaxable=varchar(3)"
Database  products  COLUMN_DEF   "weight=varchar(12)"
Database  products  COLUMN_DEF   "size=varchar(96)"
Database  products  COLUMN_DEF   "color=varchar(96)"
Database  products  COLUMN_DEF   "related=text"
Database  products  COLUMN_DEF   "featured=varchar(32)"
Database  products  COLUMN_DEF   "inactive=varchar(3) default ''"
Database  products  COLUMN_DEF   "gift_cert=varchar(3) default ''"
Database  products  NO_ASCII_INDEX 1
Database  products  INDEX         description
Database  products  INDEX         price
Database  products  INDEX         category
Database  products  INDEX         prod_group
Database  products  INDEX         inactive


Configuring catalog xxx...Using PostgreSQL, 
DSN=dbi:Pg:dbname=xxx...table products_fi_FI created: create table 
products_fi_FI (
sku char(64) NOT NULL PRIMARY KEY,
description varchar(128) DEFAULT '' NOT NULL,
title varchar(128) DEFAULT '' NOT NULL,
template_page char(128),
comment TEXT,
thumb char(128),
image char(128),
price char(128),
wholesale char(128),
prod_group varchar(64) DEFAULT '' NOT NULL,
category varchar(64) DEFAULT '' NOT NULL,
sub_category varchar(64),
tax_category char(128),
nontaxable char(128),
weight char(128),
option_type char(128),
author char(128),
related char(128),
featured char(128),
gift_cert char(128),
download char(128),
dl_type char(128),
dl_location char(128),
inactive char(128),
url char(128),
sale_price char(128),
image_large char(128),
barcode varchar(64),
original_order varchar(64)
)



Regards,

René


More information about the interchange-users mailing list