Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > PostgreSQL > DB Creation automatic script

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-19-07, 06:13
sreelatha sreelatha is offline
Registered User
 
Join Date: Dec 2007
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 12-19-07, 11:45
amthomas amthomas is offline
Registered User
 
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On