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
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
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
Hi All,
I want to create postgresql database and tables using stored functions.
Does postgresql support create statements in stored functions.
Regards,
Manasi
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
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
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
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
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