Re: create a table inside a function

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: create a table inside a function
Дата
Msg-id 20090625152933.GB26253@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: create a table inside a function  (Alain Roger <raf.news@gmail.com>)
Список pgsql-general
Alain Roger escribió:

> IF (outResult = 1) THEN
> >  return true;
> > ELSE
> >  EXECUTE 'create table sw.tmp_import (id serial NOT NULL CONSTRAINT id_key
> > PRIMARY KEY, software VARCHAR(1024), barcode VARCHAR(10), username
> > VARCHAR(1024), area VARCHAR(512), locality VARCHAR(512)) WITH
> > (OIDS=FALSE);';
> >  EXECUTE 'ALTER TABLE sw.tmp_import OWNER TO usr_audit';
> >  return false;
> > END IF;

Just leave out the EXECUTE and quotes.  This example should work without
them.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: Pedro Doria Meunier
Дата:
Сообщение: Re: Upgrade
Следующее
От: "Chris Barnes"
Дата:
Сообщение: Problems with postgres online backup - restore