Thank you very much for your help! but I did not know how to process as you mention, could you please explain as step by step.
So today I tried to do1.Add/remove PostgreSQL2.delete postgres user and pass by NET USER postgres /delete3. delete folder of postgreSQL4. Delete in side regiter of winXP in side KEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\
| Hi All, We have a lot of tables and views updated, or better said, replaced on a daily basis. We have seen that under certain conditions (which are unclear) entries of the geometry_columns table are removed. So a mismatch occurs so now and then resulting in showing either no data or being very slow when an application has to do a table scan to obtain the geometry type. What I like to have is a procedure which checks all tables and views against the geometry_columns table and makes if necessary the right corrections. Before inventing the wheel again, does anyone know if this procedure already exist or knows perhaps another/better way to achieve this? Thanks in advance, Ge |
| Hi Edward, This will not work because this function doesn't do anything with views. Also stale records aren't removed. Ge --- On Wed, 5/18/11, Edward Mac Gillavry <emacgi...@hotmail.com> wrote: |
-----Inline Attachment Follows----- |
| I foubd this an unfortunately ambiguous name. it doesn't populate geometry columns so much as update the geometry_columns table. But irrespective of the name, it is nice to have :-) Cheers Brent Wood --- On Thu, 5/19/11, Ben Madin <li...@remoteinformation.com.au> wrote: |
Yeah, think about all clients, it would be an hell of configuration to
tell qgis wheter or not to look in st_geometry_columns and/or geometry_columns
and in which order etc. etc.
My opinion is starting to form on this and currently is closer to
"maintain a real table".
typmod might make _populating_ the table easier, and you could still
add entries manually in case there's no way to tell automatically
(due to loose typemod, for example). Also, a real table might let
you add fields for XML metadata to associate to "layers", which we
might account for in 2.0.
Now, we could keep/alter geometry_columns (to add maybe also an identifier
for each layer rather than using a 3/4 columns unique key...) and have
a lame ST_geometry_columns view as naked as ISO likes it, but still querying
the real geometry_columns table.
This is basically suggesting we do _not_ make a view to tell which spatial
layers exist, but we can provide a function to do that, which may be used
but the geometry_column population function...
--strk;
() Free GIS & Flash consultant/developer
/\ http://strk.keybit.net/services.html
* Sandro Santilli (st...@keybit.net) wrote:
> On Fri, May 20, 2011 at 03:15:26AM -0400, Paragon Corporation wrote:
> > So that is why I was proposing a hybrid -- geometry_columns -- so new
> > PostGIS can work with older tools
Having a hybrid may work for backwards-compatibility reasons, but we
should have a solution which doesn't require such an ugly hack for new
code/systems/etc.
> > Though I suppose that may be more confusing than it's worth and there is the
> > case of views
Regarding views, what I would actually suggest is that we allow users a
way to tell update the typmod for the view definition directly in the
catalog rather than suggesting that they use a seperate table as an
override.
We could do this pretty easily using a function which the user would
call (instead of adding to or updating a table) which would update the
catalog definition for the view. We could also try to see if there's a
way to support doing this through 'alter view'.
> My opinion is starting to form on this and currently is closer to
> "maintain a real table".
This might be acceptable as a backwards-compatibility mode, but I think
we need a solution which doesn't depend on overriding values that are in
the catalog.
Thanks,
Stephen
P.
Paul,
Are you suggesting I'm a lunatic? I'm going to check the mirror now to see
if I'm growing fangs :).
I agree with you though -- that is the main beauty of typmod which is why
strk's solution won't work.
I would almost go with forcing everyone to change their existing tables to
typmod if they want to reap the benefits of PostGIS 2.0,
but most of my clients will not go to 2.0 then.
We could try Mark's idea of hacking the catalog tables to automagically
convert table constraints to typmod but that all sounds pretty scary to me.
Especially with my special
Inheritcance case -- I can just see that failing miserably and screwing up
my tables.
Anyrate we can't try any of these until you put in place the typmod feature.
Once you put in place typmod -- I think we can exercise all the various
options to see which evil is the least of all evils.
Thanks,
Regina
-----Original Message-----
From: postgis-us...@postgis.refractions.net
[mailto:postgis-us...@postgis.refractions.net] On Behalf Of Paul
Ramsey
Sent: Friday, May 20, 2011 7:53 AM
To: PostGIS Users Discussion; PostGIS Development Discussion
Subject: Re: [postgis-users] [postgis-devel] how to keep geometry_columns in
sync wit tablesand views (and new PostGIS 2.0 plans)
What I havn't heard yet is any explanation or description of *why* they
wouldn't want to move to 2.0 if it only supported the typmod approach..?
> We could try Mark's idea of hacking the catalog tables to automagically
> convert table constraints to typmod but that all sounds pretty scary to me.
The upgrade question should not be terribly difficult to solve by just
using the current geometry_columns table to help with the generation of
the new tables...?
> Especially with my special
> Inheritcance case -- I can just see that failing miserably and screwing up
> my tables.
Can you provide more insight on this..? I'm not familiar with your
'special inheritance case'..
> Anyrate we can't try any of these until you put in place the typmod feature.
> Once you put in place typmod -- I think we can exercise all the various
> options to see which evil is the least of all evils.
Part of the issue here, however, is if there's something the typmod
approach isn't doing currently that it could/should be doing which would
resolve these concerns...?
Thanks,
Stephen
> What I havn't heard yet is any explanation or description of *why* they
wouldn't want to move to 2.0 if it only supported the typmod approach..?
See my comment in the trac item - (short answer there are some use cases
that just can't be implemented with typmod)
http://trac.osgeo.org/postgis/ticket/944#comment:22
> We could try Mark's idea of hacking the catalog tables to
> automagically convert table constraints to typmod but that all sounds
pretty scary to me.
> The upgrade question should not be terribly difficult to solve by just
using the current geometry_columns table to help with the generation of the
new tables...?
New tables -- oh no, you'd have to do an alter (or as Mark wants directly
update the catalogs) -- imagine the nightmare if you have foreign key
constraints and what not having to create new tables.
I have no tables to test with since we don't have typmod, but once Paul gets
typmod in there (HINT HINT), I can test with fairly large tables to see how
painful doing an alter and dropping constraints would be.
> Especially with my special
> Inheritcance case -- I can just see that failing miserably and
> screwing up my tables.
> Can you provide more insight on this..? I'm not familiar with your
'special inheritance case'..
See trac comment.
Thanks,
Regina
http://www.postgis.us