Results 1 to 2 of 2

Thread: PostgreSQL query start up help

  1. #1
    Join Date
    Mar 2009
    Location
    New York
    Beans
    117
    Distro
    Ubuntu 10.04 Lucid Lynx

    PostgreSQL query start up help

    Just need some help with the initial set up of starting to make a query file using psql.

    Currently I have an .sql file which creates a bunch of tables and also fills in the tables with data.

    I have this in a directory and I just need help with the command in psql to somehow use this .sql to create the database. There will be another .sql file which I query the database from.
    I know what I need to do for the commands to get the data I need, I just need help on where to start on how to use psql to make a database from a .sql that has the table and info for the tables, and then psql to read another .sql to query the database.

    Sorry this is my first time working with sql so I apologize if my explanation sounds strange.

    edit: some more info is I am trying to do this on my local host and gedit to make the .sql files
    Last edited by Xender1; March 10th, 2011 at 05:56 AM.

  2. #2
    Join Date
    Mar 2009
    Location
    New York
    Beans
    117
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: PostgreSQL query start up help

    Ok, so right now im working with this command:
    Code:
    psql --host=localhost -U tempusr -f set_everything_up.sql
    which returns:
    Code:
    psql: FATAL:  password authentication failed for user "tempusr"
    FATAL:  password authentication failed for user "tempusr"
    I also edited my pg_hba.conf file to have my local line too:
    Code:
    local   all         all                               md5
    I am so confused as to the command line args i need to give psql in order to make the data base from the tables and info from set_everything_up.sql

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •