Re: [gnome-db] please help connecting to databse



On Sat, 6 Nov 2004 09:41:41 -0700, Neil Zanella <nzanella gmail com> wrote:
> You're right, I've just got a Unix domain socket open and not a TCP/IP socket:
> 
> $  netstat -a | grep 5432
> unix  2      [ ACC ]     STREAM     LISTENING     7286   /tmp/.s.PGSQL.5432
> 
> But I still get the same error with:
> 
> gchar *provider = "PostgreSQL";
> cnc_string = "HOST=DATABASE=joedb;USER=joedoe";
> 
> ** (JoesApp:15107): CRITICAL **: file gda-connection.c: line 843
> (gda_connection_execute_non_query): assertion `GDA_IS_CONNECTION
> (cnc)' failed
> 
> What worked for me is:
> 
> cnc_string = "DATABASE=joedb;USER=joedoe";

Sorry, I did not re-read my mail, of course the "HOST=" should not
have been there!

> 
> So I can't specify a hostname at all if I'm using Unix Domain Sockets?

No. This is the way libpgsql works.

> Wouldn't it be easier if libgda allowed the parameters localhost and
> 127.0.0.1 here?

Then how would you make the difference if someone wanted to use the
real TCP/IP socket?

I think we should better document that point in the libgda doc., though!

Cheers,

Vivien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]