Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2007
    Posts
    1

    Unanswered: DB Creation automatic script

    Hi All,

    I m new to postgre sql and this forum,
    I have a requirement that when i run a script, it should create a user as well as a database. And i want to run my script as a .psql script so that i can run on any platform.
    I m able to run a scirpt which has the tabel creation, but i failed do the db and user creations.

    Pls reply if any one of u have idea, its urgent.

    thanks and regards
    sree

  2. #2
    Join Date
    May 2005
    Location
    San Antonio, Texas
    Posts
    134
    what have you tried? can we see?

    creating roles/dbs over and over seems a bit odd :/

    you can do this:
    psql template1 < dostuff.sql

    to run a script on a db which could include db creation.
    Vi veri veniversum vivus vici
    By the power of truth, I, a living man, have conquered the universe

Posting Permissions

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