Postgresql V10 Transaction Group creates INT not BOOL

Hi guys,

Ignition V7.9.9
windows 10
postgresql v10.5

Using a Historical Transaction Group, a new group has a Boolean Data type column, when the postrgesql table is created the column has an Integer datatype instead. This then leads to errors etc…

Changing the integer datatype to boolean in DB or the boolean to interger in the TG allows for the transaction to work ok. Its just the initial creation that makes a boolean an integer.

I have used postgresql in the past and never seemed to have this issue?

Any ideas appreciated

Cheers

That’s just Ignition trying to play to the least common denominator among supported databases. In other words, some popular databases don’t really have a true boolean datatype, where a tinyint is used instead. Not that it shouldn’t be addressed, but it isn’t a surprise.

If you want to, you can change the Postgres ‘translator’ settings to use a different default column type for boolean values - go to Configure → Databases → Drivers, then translators along the top, and then you can change the data type mapping for the Postgres translator:

4 Likes

Huh. Never noticed that one.

Haha, well there you go…

I should learn to scroll down further in future… :slight_smile:

Will give it ago

Many thanks.

1 Like