A fully specified record in geometry_columns can be created even if no data exists in the table.

TypeMod is your friend!

drop table if exists foo ;
select * from geometry_columns where f_table_name = 'foo';
create table foo ( id integer, geom geometry);
select * from geometry_columns where f_table_name = 'foo';
drop table foo ;
create table foo ( id integer, geom geometry(LineString,28356));
select * from geometry_columns where f_table_name = 'foo';



Get BlueMail for Windows

Simon Greener wrote:


Can you force the creation of a record in geometry_colums?

On 1 Jul 2020, at 09:24, imran hussain <[email protected]> wrote:
I am trying to connect from Alteryx using psqlodbc driver. The geometry_columns table is not populated for the table I am trying to access, since it's got no spatial data.


From: postgis-users <[email protected]> on behalf of Simon Greener <[email protected]>
Sent: Tuesday, June 30, 2020 4:46:40 PM
To: PostGIS Users Discussion <[email protected]>
Subject: Re: [postgis-users] Postgis extension
 
Is geometry_columns fully populated?



On 1 Jul 2020, at 07:19, Regina Obe <[email protected]> wrote:

Which system are you connecting from?  Sounds like whatever system you are using is designed to work with spatial tables. Like as I recall I think ArcMap uses PostgreSQL ODBC driver.

 

There isn’t any reason otherwise why you should be having issue connecting to a non-spatial table.  I connect via SQL Server and MS Access all the time even when I have spatial tables in my database.  There isn’t even any reason why a system would check geometry_columns unless it’s designed to work with spatial data.

 

Hope that helps,

Regina

 

From: postgis-users [mailto:[email protected]] On Behalf Of imran hussain
Sent: Tuesday, June 30, 2020 3:47 PM
To: 'PostGIS Users Discussion' <[email protected]>
Subject: [postgis-users] Postgis extension

 

Hi,

 

I am trying to access the Postgres DB using ODBC driver. I have Postgis extension installed on my DB and when trying to query the non-spatial tables from the tool, I keep getting the error "no records returned from GEOMETRY_COLUMNS for this table". Is there any environment variable that would let the ODBC know that its a non spatial table and avoid looking into GEOMETRY_COLUMNS view ?

 

Thanks,

Imran Hussain



postgis-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/postgis-users



postgis-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to