Re: How to Create a Database Dynamically Using PostgreSQL

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: How to Create a Database Dynamically Using PostgreSQL
Дата
Msg-id 4A7FFF21.5070906@iol.ie
обсуждение исходный текст
Ответ на How to Create a Database Dynamically Using PostgreSQL  ("Vishnu S." <vishnu.s@nestgroup.net>)
Список pgadmin-support
On 10/08/2009 05:44, Vishnu S. wrote:

> I am New in PostgreSQL. I want to know how we create a Database
> dynamically using a postgresql function.
> 
> When I tried to create a Database like that,I got an error like the
> following,
> 
> “CREATE DATABASE cannot be executed from a function or multi-command
> string”.

This question really belongs on the pgsql-general list, as it's not
related to PgAdmin.

However, do you need to do it from a function? You could just run the
SQL "create database..." command, assuming that your user has the
necessary privileges.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------


В списке pgadmin-support по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Two issues
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Malfunction in dropping database with pgAdmin