Skip to main content
Question

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


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?

7 replies

itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • March 20, 2017

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
  • March 20, 2017

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+18
  • Contributor
  • March 20, 2017

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


Forum|alt.badge.img
  • Author
  • March 21, 2017
erik_jan wrote:

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
  • March 21, 2017

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+17
  • Supporter
  • March 21, 2017
dianne wrote:

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
  • March 23, 2017

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings