Creating DB
Creating DB
От:
"Lorenzo De Vito" <lorenzodevito@email.it>
Дата:
Is the only way to create DB in a C code to connect to Template1 and then exec the SQL string "CREATE DATABASE databasename" ?
Can I create DB without connecting to template1 ?
Re: Creating DB
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Lorenzo De Vito" writes: > Is the only way to create DB in a C code to connect to Template1 and then e= > xec the SQL string "CREATE DATABASE databasename" ? > Can I create DB without connecting to template1 ? You have to connect to *some* DB. Doesn't have to be template1, but that's the most usual choice since it's certain to exist. regards, tom lane