Skip to main content
Question

Error in PostGIS writer-Error executing SQL command ('select * from "databasename"."tablename" where false limit 0'):

  • Mar 20, 2017 7:32 PM UTC
  • 7 replies
  • 222 views

Forum|alt.badge.img

Hello,

My reader is a MapInfo table and my writer is a PostGIS database. I tested the database and I was able to successfully connect to the database. However, when I run the workbench only 1 record goes through and I get the following error: Error executing SQL command ('select * from "databasename"."tablename" where false limit 0'):'

Writer failed in write() call

Any idea of what is going wrong?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

itay
Supporter
Forum|alt.badge.img+19
  • Supporter
  • Mar 20, 2017 7:59 PM UTC

Hi,

Is the log correct? are you trying the following SQL: select * from "databasename"."tablename" where false limit 0? or did you edit it for posting?


Forum|alt.badge.img
  • Author
  • Mar 20, 2017 8:56 PM UTC

I edited it for posting. Instead of the real database name I wrote "databasename" and instead of the real table name I wrote "tablename". Then I edited the log and wherever there was the database name I wrote "Database". I didnd't edit anything else


erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • Mar 20, 2017 8:59 PM UTC

Could it be that the table does not exist and the connecting user does not have "Create table" privileges?


Forum|alt.badge.img
  • Author
  • Mar 21, 2017 12:00 AM UTC

Could it be that the table does not exist and the connecting user does not have "Create table" privileges?

The table exists and the user has "create table" privileges, so it isn't that.

 

 

 


david_r
Celebrity
  • Mar 21, 2017 11:43 AM UTC

Looks like FME is trying to truncate the table when the error occurs. Can you try disabling the truncating of "Database_test"."cal_suburbs" and try again?

You could also consider deleting (dropping) "Database_test"."cal_suburbs" using e.g. PgAdmin and let FME recreate the table for you and see if that makes a difference.


itay
Supporter
Forum|alt.badge.img+19
  • Supporter
  • Mar 21, 2017 12:10 PM UTC

I edited it for posting. Instead of the real database name I wrote "databasename" and instead of the real table name I wrote "tablename". Then I edited the log and wherever there was the database name I wrote "Database". I didnd't edit anything else

Sometimes FME can be a bit buggy and by deleting the writer and its feature types and reintoriducing them usually solves the issues (most of the times)

 

 


Forum|alt.badge.img
  • Author
  • Mar 23, 2017 2:12 AM UTC

Thanks for the answers David and Erik.

The workbench is now running. It was an issue with the PostgreSQL database.

The solution was in PgAdminIII to get the public schema changed to the owner of all the functions to PostGIS to which the user we are running has permissions.