# DBInputTable, Postgres and functions

**URL:** <https://forum.cloverdx.com/t/dbinputtable-postgres-and-functions/788>\
**Category:** CloverDX Platform\
**Created:** [December 10, 2010, 12:00am UTC](https://forum.cloverdx.com/t/dbinputtable-postgres-and-functions/788 "2010-12-10T00:00:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![newscientist](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@newscientist](https://forum.cloverdx.com/u/newscientist)\
**Post date:** [December 10, 2010, 12:00am UTC](https://forum.cloverdx.com/t/dbinputtable-postgres-and-functions/788/1 "2010-12-10T00:00:00Z")

</div>

I am using Community Edition and Postgresql 8.4.

In an earlier post it was established that a Postgresql query such as: ‘select \* from myFunc();’ cannot be used in DBExecute component, only in a DBInputTable component.

However, when I enter the above query, I get: Node DB\_INPUT\_TABLE0 finished with status: ERROR caused by: org.postgresql.util.PSQLException: ERROR: transaction is read-only

I have not set transactions to read-only and cannot set the transaction to read-write in DBInputTable.

How do I get round this?

Regards  
Chris

---

<div class="post-metadata">

**Author:** ![avackova](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@avackova](https://forum.cloverdx.com/u/avackova)\
**Post date:** [December 13, 2010, 9:44am UTC](https://forum.cloverdx.com/t/dbinputtable-postgres-and-functions/788/2 "2010-12-13T09:44:11Z")

</div>

Hello Chris,  
I can’t reproduce the problem. _select from function_ is properly executed, as well as executing the function, that returns a result set (see ExtExamples/graph/graphDBExecutePostgre.grf from our [examples](http://sourceforge.net/projects/cloveretl/files/cloveretl.engine/rel-3-0-1/cloverETL.examples.rel-3-0-1.zip/download)).  
Does the problem occur when trying to read data from the table also?

---

<div class="post-metadata">

**Author:** ![julrych](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@julrych](https://forum.cloverdx.com/u/julrych)\
**Post date:** [December 14, 2010, 2:27pm UTC](https://forum.cloverdx.com/t/dbinputtable-postgres-and-functions/788/3 "2010-12-14T14:27:59Z")

</div>

Hi Chris,  
An issue may occur if myFunc() attempts to write/update a table because the _select_ statement set the transaction as read-only. What does your myFunc() actually do?

---

<div class="post-metadata">

**Author:** ![starsailor](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@starsailor](https://forum.cloverdx.com/u/starsailor)\
**Post date:** [March 18, 2014, 2:32pm UTC](https://forum.cloverdx.com/t/dbinputtable-postgres-and-functions/788/4 "2014-03-18T14:32:39Z")

</div>

Was this issue ever resolved?

I’m asking now because I have the same problem now with DBInputTable when trying to select from certain OOB Vertica 6.1 functions like:

select analyze\_statistics(‘sometable’);

where DBInput table errors because the connnection is set to read-only mode and I can’t get DBExecute to process it because the statement has a result set that causes DBExecute to error too.

---

<div class="post-metadata">

**Author:** ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)\
**Post date:** [March 19, 2014, 12:04pm UTC](https://forum.cloverdx.com/t/dbinputtable-postgres-and-functions/788/5 "2014-03-19T12:04:14Z")

</div>

Hi,

This issue seems to be related to Vertica JDBC specific, please see [viewtopic.php?f=4&t=6781#p10822](http://forum.cloveretl.com/viewtopic.php?f=4&t=6781#p10822) for details.
