Re: create a table inside a function

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Alain Roger <raf(dot)news(at)gmail(dot)com>, Frank Heikens <frankygoestorio(at)mac(dot)com>
Subject: Re: create a table inside a function
Date: 2009-06-25 13:46:22
Message-ID: 200906250646.23191.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 25 June 2009 6:29:10 am Alain Roger wrote:
> I'm confused now because if i try my SQL command alone it works without any
> problem, but in the following pglSQL code, it does not :-(

What is the error?

>
> 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);';
^ This could be part of the problem.

> > EXECUTE 'ALTER TABLE sw.tmp_import OWNER TO usr_audit';
> > return false;
> > END IF;
>
> why ?
>
> thx.
>
> A.
>

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-06-25 13:58:07 Re: Add Space symbols for TSvector
Previous Message Chris Barnes 2009-06-25 13:40:30 Postgres online backup and restore