561553 (4) [Avatar] Offline
when I try to load Victoria city boundary linestrings I get the following error :

ERROR: no existe la relación «ch13_staging.cityboundary»
LINE 7: SELECT gid, (ST_Dump(geom)).geom FROM ch13_staging.citybound...

I tried loading ch13_staging schema from SQL Shell (using psql -f ch13_staging.sql) and directly from pgadmin 4 but it seems not work

please help

regina.leo (264) [Avatar] Offline
What error do you get when you try to load ch13_staging.sql? I see the table creation in that file so that should have worked.

You would need to use psql to load the file since it has psql specific commands that can't be loaded via pgAdmin4

561553 (4) [Avatar] Offline
Hi Regina/Leo,

what happens is that when I run the code of listing 13.10:

                   'ch13_topology', ST_Transform(geom, 32610)
           ) As edge_id
           SELECT gid, (ST_Dump(geom)).geom FROM ch13_staging.cityboundary
) As f;

i get the error "ERROR: no existe la relación «ch13_staging.cityboundary»" what in english is "ERROR:there is no relationship «ch13_staging.cityboundary»". For this reason I thought it was due to a failure to load the ch13_staging schema, but from what you tell me it seems that is not that.

anyway, when using SQL Shell I do not have any particular error message, I do it in the following way:

Username [postgres]:
Contraseña para usuario postgres:
psql (10.3)
            Vea la página de referencia de psql «Notes for Windows users»
            para obtener más de....
Digite «help» para obtener ayuda.

postgres=# psql -f ch13_staging.sql

im a little bit confused.


regina.leo (264) [Avatar] Offline
Looks like you are loading the data in the postgres database. You don't want to do that. I suspect maybe you are querying a different database.

So what you want to do is in psql

do something like:

\connect postgis_in_action

and then run the

\i ch13_staging.sql

The psql -f doesn't need to be run in psql env which it looks like you are in. If you want to do it that way, then you'd from command prompt

psql -f ch13_staging.sql -d postgis_in_action

replacing the postgis_in_action with the name of the database you want to load the data into.

561553 (4) [Avatar] Offline
Thank you very much!