[GRASSLIST:1390] Re: problems connecting to database via odbc & v.reclass.pg problems

> As to the postgres modules, they are great, but there still seems to be an
> inconsisteny in the v.reclass.pg html-page. In the text, sql queries are
> mentioned, but in the "synopsis" section the keyword is 'pql'. Then in the
> description of the keywords, no mention of pql, but of sql. In the example,
> the same problem again:
>
> "v.reclass.pg sql=vect.sql key=tlid input=t.roads.pg out­put=t.roads.12
>
> vect.pql: retrieve unique (t.tlid,t.cfcc) from t in type1
> where cfcc ~ "A1"
> sort by tlid"
>
> So, if someone could explain, what I should use, sql or pql...
Thanks for identifying the inconsistency. I have updated the html
page to "sql" and "postQUEL" to "SQL". See here:
http://www.geog.uni-hannover.de/grass/gdp/html_grass5/database.html

> Also, I do not find the explanation of the 'where' parameter very clear.
> How should this be formulated exactly ? And if I understand correctly, I
> can only extract one set of data if I use this option, i.e. I can only
> create one category.

Please remind that the *.pg pages might need final updating (web page:
"(note: needs to be updated)"). If you encounter other problems or have text
pieces to improve the pages, please let me know.

Thanks for doing the update, but is the "retrieve" statement you use in the
example a valid SQL command ? I can't find it in the postgresql commands.
Should'nt it be "select" ?

Secondly, I think an example for the other way of using v.reclass.pg, i.e.
without an external sql file would be very helpful.

> I find the odbc reclass much easier to use, but this might just be my lack of
> understanding of v.reclass.pg
>
> More generally, I like the idea of having one interface (odbc) which I can
> use in several programs, such as Grass, R, etc...
Yes, that's the intention of Radim's db.* modules...

Yes, and I want to thank him again for those...if only I could get them to work here :wink:

I also read the paper that Roger and you (Markus) wrote on R, Grass, and Postgres and I do believe that this is an important issue, as it touches user friendliness in terms of data handling...

Moritz

On Tue, Jan 23, 2001 at 04:05:35PM +0100, mlennert@club.worldonline.be wrote:

> > As to the postgres modules, they are great, but there still seems to be an
> > inconsisteny in the v.reclass.pg html-page. In the text, sql queries are
> > mentioned, but in the "synopsis" section the keyword is 'pql'. Then in the
> > description of the keywords, no mention of pql, but of sql. In the example,
> > the same problem again:
> >
> > "v.reclass.pg sql=vect.sql key=tlid input=t.roads.pg out­put=t.roads.12
> >
> > vect.pql: retrieve unique (t.tlid,t.cfcc) from t in type1
> > where cfcc ~ "A1"
> > sort by tlid"
> >
> > So, if someone could explain, what I should use, sql or pql...
> Thanks for identifying the inconsistency. I have updated the html
> page to "sql" and "postQUEL" to "SQL". See here:
> http://www.geog.uni-hannover.de/grass/gdp/html_grass5/database.html
>
> > Also, I do not find the explanation of the 'where' parameter very clear.
> > How should this be formulated exactly ? And if I understand correctly, I
> > can only extract one set of data if I use this option, i.e. I can only
> > create one category.
>
> Please remind that the *.pg pages might need final updating (web page:
> "(note: needs to be updated)"). If you encounter other problems or have text
> pieces to improve the pages, please let me know.

Thanks for doing the update, but is the "retrieve" statement you use in the
example a valid SQL command ? I can't find it in the postgresql commands.
Should'nt it be "select" ?

Moritz,

please try if "select" is o.k. (as it sounds reasonable). Then I will
update this as well (sorry, no time to test myself).

Secondly, I think an example for the other way of using v.reclass.pg, i.e.
without an external sql file would be very helpful.

Yes, I agree.
Please see
http://www.geog.uni-hannover.de/grass/sqlgrasslist.html
-> Small raw tutorial: first-steps for usage of PostgreSQL/GRASS interface

This is very incomplete but such an example is there. If you could
write a small piece of text for the html-page, I'll add this.
Thanks for your cooperation!

> > I find the odbc reclass much easier to use, but this might just be my lack of
> > understanding of v.reclass.pg
> >
> > More generally, I like the idea of having one interface (odbc) which I can
> > use in several programs, such as Grass, R, etc...
> Yes, that's the intention of Radim's db.* modules...

Yes, and I want to thank him again for those...if only I could get them to
work here :wink:

I also read the paper that Roger and you (Markus) wrote on R, Grass, and
Postgres and I do believe that this is an important issue, as it touches
user friendliness in terms of data handling...

Yes, here much more has to be done. I hope the best for GRASS 5.1 :slight_smile:

Markus Neteler