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

Markus Neteler neteler at geog.uni-hannover.de
Tue Jan 23 10:07:59 EST 2001


Moritz,

On Tue, Jan 23, 2001 at 12:32:13PM +0100, mlennert at club.worldonline.be wrote:
> It is a problem between Postgres and ODBC since DataManager doesn't work. I've 
> looked into the postmaster -i problem, but debian seems to handle this 
> differently via a postmaster.init file, in which there is a variable 
> PGALLOWTCPIP=yes. I've tried stopping the postmaster and restarting it by 
> simply typing postmaster -i, but this didn't change anything.
> But I guess this is too far off-topic. I'll try to find the solution in the 
> Postgres / Debian mailing lists...
> 
> 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.

> 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...

Regards

 Markus Neteler

> Radim.Blazek at dhv.cz said:
> > he problem seems to be in the connection ODBC<->Postgres. Could you
> > test your DSN with isql program or DataManager first? 
> 
> > Radim
> 
> 
> arne at waikato.ac.nz said:
> > Hi Moritz,
> > I am not really shure, but could it be, that you do not start postgres
> > with the "-i" option?? It sounds like the error I had first starting
> > with postgres... And another question, why don't you use the postgres
> > module??
> 
> > Arne
> 
> 
> 
> 
> >  
> > 
> > On 22-Jan-01 mlennert at club.worldonline.be wrote:
> > > In db.tables, I get the following error message when trying to connect to a 
> > > postgres database via the odbc driver:
> > > 
> > > DBMI-ODBC driver error: SQLConnect():
> > > [unixODBC]Could not connect to the server;
> > > Could not connect to remote socket. (101)
> > > 
> > > What am I doing wrong ?
> > > 
> > > Moritz
> > 
> > -- 
> > Arne Pallentin
> > 
> > Department of Earth Sciences
> > The University of Waikato
> > Private Bag 3105
> > Hamilton - New Zealand
> > 
> > Ph.:       +64-7-838 4024 ext. 6229
> > Home:    +64-7-856 7877
> > Fax.      +64-7-856 0115
> > e-mail:  arne at waikato.ac.nz
> > 
> > 
> 

-- 
Markus Neteler *  University of Hannover
Institute of Physical Geography and Landscape Ecology
Schneiderberg 50 * D-30167 Hannover * Germany
Tel: ++49-(0)511-762-4494  Fax: -3984




More information about the grass-user mailing list