Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

[Bug] Postgres column types broken in 9.1.0.4876

jamesvl's profile image jamesvl posted 6 years ago in General Permalink
Previously, Heidi would properly show char and varchar columns with their appropriate limits. Something in the latest build has broken that for Postgres 9.3.

Now, I see varchar fields simply listed as 'CHAR', with no length set.

Bonus bug: Heidi doesn't yet recognize column types of 'uuid' either.
ansgar's profile image ansgar posted 6 years ago Permalink
Works for me here, on PostgreSQL 9.3.4. Please post a CREATE TABLE query for a table with char(10) or whatever types in it.
jamesvl's profile image jamesvl posted 6 years ago Permalink
Sure thing - here's the CREATE TABLE, directly from PG Admin:

CREATE TABLE test_char_types
(
id character varying(60) NOT NULL,
name character varying(128) NOT NULL,
country_code character varying(6) NOT NULL,
locale character varying(6) NOT NULL,
targeting_type character varying(32) NOT NULL,
CONSTRAINT test_pkey PRIMARY KEY (id)
)
WITH (
OIDS=FALSE,
autovacuum_enabled=true
);


But once created, i fyou look at the table details, all fields show "CHAR".
Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
ansgar's profile image ansgar posted 6 years ago Permalink
Confirmed. Seems that "CHARACTER" is winning over "CHARACTER VARYING" in HeidiSQL's hardcoded data type names.
Code modification/commit from ansgar.becker, 6 years ago, revision 4880
PostgreSQL: Let longer data type matches win over shorter ones, in TDBConnection.GetDatatypeByName. Important e.g. for CHARACTER and CHARACTER VARYING. See http://www.heidisql.com/forum.php?t=17061
ansgar's profile image ansgar posted 6 years ago Permalink
Fixed in r4880
jamesvl's profile image jamesvl posted 6 years ago Permalink
Thanks for the quick fix!

CHARACTER VARYING fields are indeed correctly showing as VARCHAR again, with their proper length.

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.