Question

How to change PostGIS Reader varchar width on certain fields


Badge

I'm reading a PostGIS database layer that is formatted as 'Text'. PostGIS treats this as basically an unlimited-width VARCHAR field. However, the FME PostGIS Reader truncates this field's input to 80 characters, and I can't get it to change to accommodate more characters.


2 replies

Badge +2

@rudystricklan1​ I haven't been able to reproduce your issue in FME 2021 using the following example data:

CREATE TABLE longtext
(
    longtext text ,
    longvarchar character varying(150) ,
    longchar character(150) 
);
 
insert into longtext values ('123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*',
 '123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*',
'123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*');

When I read this data back in FME the 'text' field reads all 120 characters.  Perhaps you can use this small example to replicate your problem and then we can chase down the cause.

Badge

@rudystricklan1​ I haven't been able to reproduce your issue in FME 2021 using the following example data:

CREATE TABLE longtext
(
    longtext text ,
    longvarchar character varying(150) ,
    longchar character(150) 
);
 
insert into longtext values ('123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*',
 '123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*',
'123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*');

When I read this data back in FME the 'text' field reads all 120 characters.  Perhaps you can use this small example to replicate your problem and then we can chase down the cause.

Thanks, Mark. Actually, the solution was to change the *writer* parameter to 150. It seems odd that it isn't the PostGIS Reader parameters that control the amount of data read in per field. Please make this issue as solved!

Rudy Stricklan

Reply