Skip to main content
Looks like FMEServer 2013 does a Postgis query by default with the owner "public" before using the login specified in the fmw?? The error raised is causing me problems in my application NOTE: All my data is not in the public schema

 

Log:

 

Error executing SQL command ('select * from "public"."hafa_acoa_02_poly" limit 0'): 'ERROR: relation "public.hafa_acoa_02_poly" does not exist

 

No spatial column was found for 'public.hafa_acoa_02_poly'. This is most likely a PostgreSQL table with no spatial data. No geometry will be read. If spatial data is not present, please try using the PostgreSQL reader instead

 

PostGIS geometry type unknown or empty (). Setting PostGIS geometry to 'postgis_none'

 

Error executing SQL command ('select * from "public"."hafa_acoa_02_poly" where false limit 0'): 'ERROR: relation "public.hafa_acoa_02_poly" does not exist

 

SQL query on table 'public.hafa_acoa_02_poly' failed or returned an empty result. Skipping table

 

 
Hi,

 

 

a couple of questions:
  • does it work using FME Desktop 2013?
  • have you specified the schema qualifier in the reader? (e.g. "myschema.mytablename")
  • is there a table called "hafa_acoa_02_poly" in the public schema as well?
The most important is to include the schema qualifier when you create the feature type in the reader. The schema "public" is the default schema when nothing else has been specified.

 

 

David
Ah, and I forgot an important point: check the PostGIS-specific table "geometry_columns" and see that the field value "f_table_schema" is correct and that your table isn't referenced both in the "public" and in the other schema.

 

 

This table contains metadata that is read by FME and it can come out of sync in certain situations, such as when manually executing CREATE TABLE and DROP TABLE.

 

 

David
Thanks David for your quick reply: 1) the f_table_schema field is ok in table geometry_columns (my owner = admgeo)

 

2) yes it works with FME Desktop 2013

 

3) yes the owner is specified in the reader

 

4) there is no table in the public schema except geometry_columns and  spatial_ref_sys

 

you can view the complete log here:

 

https://docs.google.com/document/d/1ZMy_7ApKHMcrB2K-5V5e5PqYcAit2rMI1ZlsFd0qf6A/edit?usp=sharing

 

 

MartinO
Thanks for the log. Am I right in guessing that the feature type is simply called "hafa_acoa_02_poly" in the workspace? I am basing this assumpting on entry under line 433 in the log called "Features With No Schema defined".

 

 

If so, you will have to recreate the feature type as "admgeo.hafa_acoa_02_poly".

 

 

I do not know why FME Desktop and Server behaves differently here. Could it be a case of different build numbers?

 

 

Note that PostGIS/PostgreSQL treats schemas a bit differently from e.g. Oracle, I think that might part of the problem here.

 

 

Hope this helps.

 

 

David
The tablename is a public parameter in my fmw and my client application was not passing the owner with the table list.  

 

 

Even if the database username was specify in my fmw ()

 

I just add it in my PHP code before calling the fmw with the rest api and everything was OK!

 

 

Thanks a lot David and @FMEDoctors!

 

 

MartinO

Reply