[GRASSLIST:5739] Re: Grass 6.0 and PG Database - tables not being
deleted when vectors g.removed
Craig Aumann
caumann at ualberta.ca
Fri Feb 11 13:10:32 EST 2005
Thanks Radim!
On Fri, 2005-02-11 at 07:47, Radim Blazek wrote:
> g.remove (db_table_exists) was using fully qualified names (table.schema
> ->public.fmacopy) so it could not find fmacopy.
> I have fixed that so that if the input table name is fully qualified,
> db_table_exists checks full name otherwise only table.
>
> I am not sure if it is the best solution, unfortunately we don't have
> enough experience with schemas. The table with the same name can be in
> other schema.
>
> I think that it is better to use db.connect schema=, even if you use
> only public.
>
> Radim
>
> Craig Aumann wrote:
> > I recently upgraded from an older version of Grass57 to the new Grass
> > 6. I can't figure out why the posgressql tables aren't being removed
> > when I delete a vector.
> >
> > Here's my setup:
> >
> > GRASS 6.0.cvs:~/sagdalpac/AREAS/L11SAGD > db.connect -p
> > driver:pg
> > database:dbname=L11SAGD,user=caumann
> > schema:(null)
> > group:(null)
> >
> > GRASS 6.0.cvs:~/sagdalpac/AREAS/L11SAGD > v.db.connect -p fma
> > Vector map <fma> is connected by:
> > layer <1> table <fma> in database <dbname=L11SAGD,user=caumann> through
> > driver <pg> with key <cat>
> >
> > g.copy vect=fma,fmacopy
> > COPY [fma at caumann] to current mapset as [fmacopy]
> > WARNING: 'user' in database definition is not supported, use db.login
> > WARNING: 'user' in database definition is not supported, use db.login
> > WARNING: 'user' in database definition is not supported, use db.login
> >
> >
> >
> >>v.db.connect -p fmacopy
> >
> > Vector map <fmacopy> is connected by:
> > layer <1> table <fmacopy> in database <dbname=L11SAGD,user=caumann>
> > through driver <pg> with key <cat>
> >
> >
> >>GRASS 6.0.cvs:~/sagdalpac/AREAS/L11SAGD > g.remove vect=fmacopy
> >
> > REMOVE [fmacopy]
> > WARNING: 'user' in database definition is not supported, use db.login
> > WARNING: Table 'fmacopy' linked to vector did not exist.
> >
> >
> > WHAT??? The table IS in the database.
> >
> > GRASS 6.0.cvs:~/sagdalpac/AREAS/L11SAGD > db.tables -p
> > WARNING: 'user' in database definition is not supported, use db.login
> > public.fma
> > public.fmacopy
> >
> > fmacopy is still in the database.... What is going on???
> >
> > Cheers!
> > Craig
> >
>
More information about the grass-user
mailing list