Andreas, I had forgotten to exclude raster_columns (fixed now), but the fundamental problem was that empty geometry tables weren't being handled correctly. I suspect raster_columns was probably the only empty table with a geometry column in your database.
Should all be fixed now. Thanks for reporting, Regina http://www.postgis.us > -----Original Message----- > From: postgis-users-boun...@postgis.refractions.net > [mailto:postgis-users-boun...@postgis.refractions.net] On > Behalf Of Andreas Forø Tollefsen > Sent: Sunday, September 18, 2011 2:07 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] Populate_geometry_columns() problems > > Tonight I did a full reinstall of Ubuntu 11.04 and > reinstalled the postgresql and postgis. > "POSTGIS="2.0.0SVN" GEOS="3.3.0-CAPI-1.7.0" PROJ="Rel. 4.7.1, > 23 September 2009" LIBXML="2.7.8" USE_STATS" > This is also rev 7862. > > The same error exists, > ERROR: query string argument of EXECUTE is null > CONTEXT: PL/pgSQL function "populate_geometry_columns" line > 53 at EXECUTE statement PL/pgSQL function > "populate_geometry_columns" line 50 at assignment > > ********** Error ********** > > ERROR: query string argument of EXECUTE is null SQL state: 22004 > Context: PL/pgSQL function "populate_geometry_columns" line > 53 at EXECUTE statement PL/pgSQL function > "populate_geometry_columns" line 50 at assignment > > while this works fine: > select populate_geometry_columns('public.cshapes'::regclass); > 0 > > 2011/9/17 Andreas Forø Tollefsen <andrea...@gmail.com>: > > Hi, > > > > This is a small database, and the populate_geometry_columns > works for > > all tables when i do them one at the time. > > i.e. select > populate_geometry_columns('public.cshapes'::regclass); returns 0. > > > > However running this just as a populate_geometry_columns(); > produces the error. > > > > Just out of curiosity I tried with: > > select populate_geometry_columns('public.raster_columns'::regclass); > > which is not supposed to work? Or is it? > > And this returned: > > ERROR: query string argument of EXECUTE is null > > CONTEXT: PL/pgSQL function "populate_geometry_columns" line 53 at > > EXECUTE statement > > > > ********** Error ********** > > > > ERROR: query string argument of EXECUTE is null SQL state: 22004 > > Context: PL/pgSQL function "populate_geometry_columns" line 53 at > > EXECUTE statement > > > > Andreas > > > > 2011/9/18 Paragon Corporation <l...@pcorp.us>: > >> Andreas, > >> > >> I'll take a look at this one tomorrow. Off the top of my > head, I'm > >> guessing you have an empty geometry table with no > constraints on it > >> so the routine can not guess what to set the constraints > to. I'm not > >> sure I guarded against that condition. > >> > >> Can you verify that doing populate_geometry_columns works for a > >> single table > >> > >> E.g. > >> > >> SELECT populate_geometry_columns('public.mytable'::regclass); > >> > >> > >> If you do see an empty table you can try the single call > against that > >> and I suspect it will fail. > >> > >> -----Original Message----- > >> From: postgis-users-boun...@postgis.refractions.net > >> [mailto:postgis-users-boun...@postgis.refractions.net] On > Behalf Of > >> Andreas Forø Tollefsen > >> Sent: Saturday, September 17, 2011 8:39 PM > >> To: PostGIS Users Discussion > >> Subject: Re: [postgis-users] Populate_geometry_columns() problems > >> > >> Hi, > >> This is revision 7862. > >> Just tried updating through the svn respitory. > >> select postgis_full_version(); returns > >> postgis_full_version > >> > --------------------------------------------------------------------- > >> ------- > >> --------------------------------- > >> POSTGIS="2.0.0SVN" GEOS="3.4.0dev-CAPI-1.8.0" PROJ="Rel. > 4.7.1, 23 > >> September 2009" LIBXML="2.7.7" USE_STATS > >> (1 row) > >> > >> Still having the same issue: > >> priogrid=# select populate_geometry_columns(); > >> ERROR: query string argument of EXECUTE is null > >> CONTEXT: PL/pgSQL function "populate_geometry_columns" line 53 at > >> EXECUTE statement PL/pgSQL function > "populate_geometry_columns" line > >> 50 at assignment > >> > >> > >> > >> 2011/9/16 Sandro Santilli <s...@keybit.net>: > >>> On Thu, Sep 15, 2011 at 11:25:52PM +0200, Andreas Forø > Tollefsen wrote: > >>>> Hi all, > >>>> > >>>> Trying to do a populate_geometry_columns(); but it does not work. > >>>> This is PostGis 2.0 with Gdal 1.8, Geos 3.4 > >>> > >>> Revision number ? > >>> > >>>> Command: SELECT Populate_Geometry_Columns(); > >>>> ERROR: query string argument of EXECUTE is null > >>>> CONTEXT: PL/pgSQL function "populate_geometry_columns" > line 53 at > >>>> EXECUTE statement PL/pgSQL function "populate_geometry_columns" > >>>> line 50 at assignment > >>>> > >>>> Any ideas? > >>> > >>> Update to latest trunk revision, make sure to re-source > postgis.sql, > >>> try again. If the problem persists please file ticket. > >>> > >>> --strk; > >>> > >>> () Free GIS & Flash consultant/developer > >>> /\ http://strk.keybit.net/services.html > >>> _______________________________________________ > >>> postgis-users mailing list > >>> postgis-users@postgis.refractions.net > >>> http://postgis.refractions.net/mailman/listinfo/postgis-users > >>> > >> _______________________________________________ > >> postgis-users mailing list > >> postgis-users@postgis.refractions.net > >> http://postgis.refractions.net/mailman/listinfo/postgis-users > >> > >> > >> _______________________________________________ > >> postgis-users mailing list > >> postgis-users@postgis.refractions.net > >> http://postgis.refractions.net/mailman/listinfo/postgis-users > >> > > > _______________________________________________ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users