Re: Help with pq++

From: Aristide Aragon <aristide(at)lionking(dot)org>
To: "Belcher, Jim" <JBelcher(at)elastic(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help with pq++
Date: 2001-02-26 21:53:56
Message-ID: 20010226155356.A18331@busa.lionking.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 26, 2001 at 01:53:18PM -0500, Belcher, Jim wrote:
> Im not sure how to tell, but i had to to a "grant all on table 'such and
> such'"
> for a user to have access to that table. You can also grant partial
> privleges
> such as insert etc.

I did a "GRANT all ON mydb TO public" and I still ge tthe error.
Is there no error log or something where I could check what is wrong?

Thanks

Aristide

> -----Original Message-----
> From: Aristide Aragon [mailto:aristide(at)lionking(dot)org]
> Sent: Monday, February 26, 2001 1:51 PM
> To: Belcher, Jim
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: Help with pq++
>
>
> On Mon, Feb 26, 2001 at 01:21:43PM -0500, Belcher, Jim wrote:
> > the code looks fine, is the user you run this code with
> > in the database as a valid user for database "mydb"?
>
> The user exists, but I don't know if for that database. How do I know?
>
> Thanks
>
> Aristide
>
> > -----Original Message-----
> > From: Aristide Aragon [mailto:aristide(at)lionking(dot)org]
> > Sent: Saturday, February 24, 2001 8:11 PM
> > To: pgsql-general(at)postgresql(dot)org
> > Subject: Help with pq++
> >
> >
> > Hello
> > I need to make a program that uses pq++, before starting I made a little
> > program to see if I understood correctly how to use pq++, however I have a
> > problem: The program can't connect to the DB.
> > My code looks like this:
> > #include <stdio.h>
> > #include <libpq++.h>
> >
> > int main()
> > {
> > PgDatabase db("dbname=mydb");
> > if (!(db.ConnectionBad()))
> > {
> > printf("OK\n");
> > exit(0);
> > }
> > else
> > {
> > printf("Error connecting\n");
> > exit(1);
> > }
> > }
> >
> > And no matter what I do (I tried with the env variables PGHOST, PGPORT,
> > PGDATABASE and PGUSER) the program always gives me "Error connecting".
> > Can somebody help? I was expecting to have problems, but not this early.
> >
> > Aristide

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Norman J. Clarke 2001-02-26 22:31:05 Re: avoiding endless loop in an UPDATE trigger
Previous Message Tulio Oliveira 2001-02-26 21:12:23 Re: Permission denied while insert