Re: [ADMIN] Create database/table using postgresql stored function

2010-12-08 Thread Guillaume Lelarge
Le 08/12/2010 11:04, Manasi Save a écrit : > Also I want to query multiple databases from stored functions from one > central database. > for ex := > > CREATE OR REPLACE FUNCTION test () RETURNS AS > $BODY$ > > SELECT * FROM db2.volume > ORDER BY db2.volume.volumeID > > $BODY$ > LANGUAGE sql S

Re: [ADMIN] Create database/table using postgresql stored function

2010-12-08 Thread Guillaume Lelarge
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

Re: [ADMIN] Create database/table using postgresql stored function

2010-12-08 Thread Manasi Save
Also I want to query multiple databases from stored functions from one central database. for ex := CREATE OR REPLACE FUNCTION test () RETURNS AS $BODY$ SELECT * FROM db2.volume ORDER BY db2.volume.volumeID $BODY$ LANGUAGE sql STABLE COST 100 ROWS 1000;' I have implemented this thing in my

[ADMIN] Create database/table using postgresql stored function

2010-12-08 Thread Manasi Save
Hi All, I want to create postgresql database and tables using stored functions. Does postgresql support create statements in stored functions. Regards, Manasi

Re: [ADMIN] create database with template question

2008-07-10 Thread Scott Marlowe
On Thu, Jul 10, 2008 at 7:24 AM, Dev <[EMAIL PROTECTED]> wrote: > Hi, > > I have a database with a table and some triggers and functions set > on it. I converted it into a template setting the fields datallowcon=false > and datistemplate=true on it. Lets assume this template(database) is ca

[ADMIN] create database with template question

2008-07-10 Thread Dev
Hi,     I have a database with a table and some triggers and functions set on it. I converted it into a template setting the fields datallowcon=false and datistemplate=true on it. Lets assume this template(database) is called as mytemplate. Now, as a normal database user I issue the create

Re: [ADMIN] CREATE DATABASE

2003-11-10 Thread Peter Eisentraut
jose writes: > PostgreSQL is not consistent in the way it uses upper/lower case to > create databases and access it. > Why psql -c 'CREATE DATABASE name_db' uses lower(name_db) an less the > name is enclosed by "" but psql name_db ? These are two different language bindings for the same function

Re: [ADMIN] CREATE DATABASE

2003-11-10 Thread Tom Lane
jose <[EMAIL PROTECTED]> writes: > PostgreSQL is not consistent in the way it uses upper/lower case to > create databases and access it. Folding case in unquoted names in SQL commands is required by the spec. On the other hand, we decided some time ago that names appearing in command-line argumen

[ADMIN] CREATE DATABASE

2003-11-10 Thread jose
Hi, PostgreSQL is not consistent in the way it uses upper/lower case to create databases and access it. Why psql -c 'CREATE DATABASE name_db' uses lower(name_db) an less the name is enclosed by "" but psql name_db ? Take a look psql template1 -c "create database MYDB" psql MYDB psql: FAT