# Pikaview: Handling postgres serial columns

**URL:** <https://forum.inductiveautomation.com/t/pikaview-handling-postgres-serial-columns/110374>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 4, 2025, 12:12pm UTC](https://forum.inductiveautomation.com/t/pikaview-handling-postgres-serial-columns/110374 "2025-09-04T12:12:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![henning.e.heine](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/henning.e.heine/32/70958_2.png) [@henning.e.heine](https://forum.inductiveautomation.com/u/henning.e.heine)\
**Post date:** [September 4, 2025, 12:12pm UTC](https://forum.inductiveautomation.com/t/pikaview-handling-postgres-serial-columns/110374/1 "2025-09-04T12:12:34Z")

</div>

I am currently exploring the Pikaview exchange resource. From what I could test so far, it worked well with a MySQL database. However when I tried to use it with postgres, I got stuck when it came to displaying the data. It seems like the type conversion has problems handling postgres serial columns.

Those columns have a default value in the form of `nextval('my_table_id_seq').`

When I try to display a table for a newly created configuration I get the following error:

> Traceback (most recent call last): File "", line 133, in transform File "module:exchange.pikaview.model\_base", line 467, in getNewInstance File "module:exchange.pikaview.model\_base", line 487, in \_convertFromDBType File "module:exchange.pikaview.type\_map", line 96, in convertFromDbType ValueError: invalid literal for int() with base 10: 'nextval('my\_table\_id\_seq'::regclass)

I think MySQL works because it does not have a default value vor AUTO INCREMENT columns.

Any suggestions, where to start fixing this? I am not sure how I could extend the type\_map to accommodate the serial columns?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 4, 2025, 12:21pm UTC](https://forum.inductiveautomation.com/t/pikaview-handling-postgres-serial-columns/110374/2 "2025-09-04T12:21:20Z")

</div>

The assumption that default values aren't expressions is common in the MySQL & MariaDB world. (MariaDB added support in v10.2-ish.)

PostgreSQL has supported expressions as defaults for ages, and uses that support to implement its auto-increment functionality.

You have to break the assumption that the default can be directly parsed as the data type of the column.
