Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Help - user/relation does not exist: msg#00029

db.postgresql.lipqxx

Subject: Re: Help - user/relation does not exist

Thank you for your reply. I think the reason may be because somehow I
had 2 different versions of PostgreSQL (7 & 8) (doing pg_config
--version showed 8.1 but PG_VERSION file says I have 7.4). So I
uninstalled and reinstalled everything and now it works just fine.
Thanks again!

> > When running the executable as any user other than postgres, I got an
> > exception:
>
> > Runtime error: FATAL: user "test" does not exist
>
> This is definitely a generic problem in how the database is set up--AFAICS
> it's not specific to libpqxx, so the easiest way to debug the problem may
> be to run the command-line SQL client "psql" instead of your own program.
>
> My first guess would be that somehow you're performing different parts of
> your test under different postgres user identities or in different
> databases.
>
>
> > I already created an user 'test' and granted all priviledge. By doing
> > "select * from pg_users;" from pgsql command line, I could see 2 users
> > in the table, 'test' and 'postgres'. Why did I still get the exception
> > "user does not exist"?
>
> How exactly did you create the user and grant all privileges? Did you use
> the command-line program "createuser," or did you run "CREATE USER" in
> SQL, or what?
>
>
> > Now, if I logged in as postgres, then connection is established, but I
> > can't execute the "select * from test_tbl;"; it complains about not
> > seeing table test_tbl even though I already created one via command
> > line.
>
> Can you see that table (and in that same database) when using psql?
>
>
> > If in the test program itself, I call w.exec("CREATE TABLE
> > test_tbl....") and insert some data in, then the select call returns
> > the correct result. But via command line, I can't see newly created
> > test_tbl at all. Could anybody help me with this?
>
> Again, how exactly did you create that table? Are you sure you did so in
> the same database?
>
>
> > conn.activate();
>
> Side note: this is really not needed. If your connection is ever
> deactivated, it will re-activate automatically when you resume using it.
> Also, no need in libpqxx to have trailing semicolons (";") at the end of
> your SQL statements. They should work, but they're really not supposed to
> be there.
>
>
> Jeroen
>
>
>


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation