pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: Manasi Save <manasi.save@artificialmachines.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Create database/table using postgresql stored function
Date: Wed, 08 Dec 2010 11:47:31 +0100
Message-ID: <4CFF6243.6070700@lelarge.info> (raw)
In-Reply-To: <20101208044350.5tkfeuzqm0gs44w4@mail.artificialmachines.com>
References: <20101208044350.5tkfeuzqm0gs44w4@mail.artificialmachines.com>

Le 08/12/2010 10:43, Manasi Save a écrit :
> [...]
> I want to create postgresql database and tables using stored functions. 
> 
> Does postgresql support create statements in stored functions. 
> 

You cannot use CREATE DATABASE from a stored function or in a
multistatements query. But AFAICT, any of the other DDL statements are
available in a stored function (or in a transaction for that matter).


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com



view thread (4+ messages)  latest in thread

Message-ID: <4CFF6243.6070700@lelarge.info>
Permalink:  ../4CFF6243.6070700@lelarge.info/
Also on:    postgresql.org/message-id/4CFF6243.6070700@lelarge.info

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: guillaume@lelarge.info, manasi.save@artificialmachines.com
  Subject: Re: Create database/table using postgresql stored function
  In-Reply-To: <4CFF6243.6070700@lelarge.info>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox