Return-Path: owner-postman
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id LAA25441 for postgres-redist; Thu, 28 Jul 1994 11:46:24 -0700
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199407281846.LAA25441@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.149.14]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id LAA25431 for <postgres@postgres.Berkeley.EDU>; Thu, 28 Jul 1994 11:46:20 -0700
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.4/8.1B) with SMTP id LAA25673; Thu, 28 Jul 1994 11:46:08 -0700
Message-Id: <199407281846.LAA25673@faerie.CS.Berkeley.EDU>
X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol
From: aoki@CS.Berkeley.EDU (Paul M. Aoki)
To: bfroehli@AWI-Bremerhaven.DE (Bernd Froehlich)
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: createdb in libpq 
Reply-To: aoki@CS.Berkeley.EDU (Paul M. Aoki)
In-reply-to: Your message of Thu, 28 Jul 94 10:41:02 +0200 
	     <9407280841.AA20712@edvs1.awi-bremerhaven.de> 
Date: Thu, 28 Jul 94 11:46:08 -0700
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-redist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Thu, 28 Jul 94 11:46:20 -0700
Resent-XMts: smtp

bfroehli@AWI-Bremerhaven.DE (Bernd Froehlich) writes:
> Is it somehow possible to create a new database from inside a C-program?

the trivial way is to run the usual "createdb" script using system(3)
or popen(3) or something.

the almost-as-trivial way is to look at the createdb script and do what 
it does -- attach to template1, and run a "createdb" query.
--
  Paul M. Aoki          |  University of California at Berkeley
  aoki@CS.Berkeley.EDU  |  Dept. of EECS, Computer Science Division (#1776) 
                        |  Berkeley, CA 94720-1776

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
