Dear all

While trying to connect to postgressql through C program iam getting the following error
.....

Connection to database failed.
FATAL: user "root" does not exist

How can I connect to the database as user 'postgres' through C .

Rgds
krishna

Search Discussions

  • Andreas Kretschmer at Feb 23, 2006 at 9:50 am

    am 23.02.2006, um 15:14:58 +0530 mailte Krishnaprasad folgendes:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    Please, no HTML!
    <br>
    How can I connect to the database as user 'postgres' through C .<br>
    <br>
    http://www.postgresql.org/docs/8.1/interactive/ecpg.html


    HTH, Andreas
    --
    Andreas Kretschmer (Kontakt: siehe Header)
    Heynitz: 035242/47215, D1: 0160/7141639
    GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
    === Schollglas Unternehmensgruppe ===
  • Krishnaprasad at Feb 23, 2006 at 9:55 am
    Dear all

    While trying to connect to postgressql through C program iam
    getting the following error .....

    Connection to database failed.
    FATAL: user "root" does not exist

    How can I connect to the database as user 'postgres' through C .

    Rgds
    krishna
  • Andreas Kretschmer at Feb 23, 2006 at 10:14 am

    am 23.02.2006, um 15:31:22 +0530 mailte Krishnaprasad folgendes:
    Dear all

    While trying to connect to postgressql through C program iam getting
    the following error .....
    Connection to database failed.
    FATAL: user "root" does not exist

    How can I connect to the database as user 'postgres' through C .

    Read:
    http://www.postgresql.org/docs/8.1/interactive/ecpg-connect.html

    You can find there a example.


    HTH, Andreas
    --
    Andreas Kretschmer (Kontakt: siehe Header)
    Heynitz: 035242/47215, D1: 0160/7141639
    GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
    === Schollglas Unternehmensgruppe ===
  • Naz Gassiep at Feb 23, 2006 at 10:14 am
    you have to connect to the database using the operating system's
    database user. This is usually "postgres" in most default installs. if
    your program is running as root, it will need to specify the user it
    wants to use when connecting to the db.

    - MrNaz.


    Krishnaprasad wrote:
    Dear all

    While trying to connect to postgressql through C program iam
    getting the following error .....
    Connection to database failed.
    FATAL: user "root" does not exist

    How can I connect to the database as user 'postgres' through C .

    Rgds
    krishna


    ---------------------------(end of broadcast)---------------------------
    TIP 1: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to majordomo@postgresql.org so that your
    message can get through to the mailing list cleanly
    --
    --------------------------------------------------------------
    MrNaz photo gallery and journal at:
    www.mrnaz.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedFeb 23, '06 at 9:39a
activeFeb 23, '06 at 10:14a
posts5
users3
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase