Thread: drop table in PL/pgSQL

drop table in PL/pgSQL

From
"datactrl"
Date:
When I use "drop Table ..."  in PL/pgSQL, it always causes an error as
"ERROR copyObject: don't know how to copy 614"

JACK



Re: drop table in PL/pgSQL

From
Jie Liang
Date:
You cannot CREATE|DROP ALTER table in PL/pgSQL, 
in general, plsql can only take DML(i.e. SELECT|
INSERT|UPDATE..)



Jie LIANG

St. Bernard Software

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang@ipinc.com
www.stbernard.com
www.ipinc.com

On Fri, 23 Mar 2001, datactrl wrote:

> When I use "drop Table ..."  in PL/pgSQL, it always causes an error as
> "ERROR copyObject: don't know how to copy 614"
> 
> JACK
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
> 



Re: drop table in PL/pgSQL

From
Roberto Mello
Date:
On Fri, Mar 23, 2001 at 09:52:56AM -0800, Jie Liang wrote:
> 
> You cannot CREATE|DROP ALTER table in PL/pgSQL, 
> in general, plsql can only take DML(i.e. SELECT|
> INSERT|UPDATE..)
You can't? I just did (on PG 7.1). AFAIK, you _can_ CREATE/DROP, but you can't roll back.
-Roberto
-- 
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club|------+ Roberto Mello - Computer Science, USU -
http://www.brasileiro.net     http://www.sdl.usu.edu - Space Dynamics Lab, Web Developer    
 
"Carrier detected." Go to the dentist...


Re: drop table in PL/pgSQL

From
Jie Liang
Date:
Hmm,

I didn't know that, this general idea from Orcale plsql,
So, I assume that you can
SELECT somefield into a_new_table FROM a_old_table

in pg 7.1???

Thank you.

No DDL can be roll back. 

Jie LIANG

St. Bernard Software

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang@ipinc.com
www.stbernard.com
www.ipinc.com

On Fri, 23 Mar 2001, Roberto Mello wrote:

> On Fri, Mar 23, 2001 at 09:52:56AM -0800, Jie Liang wrote:
> > 
> > You cannot CREATE|DROP ALTER table in PL/pgSQL, 
> > in general, plsql can only take DML(i.e. SELECT|
> > INSERT|UPDATE..)
> 
>     You can't? I just did (on PG 7.1). 
>     AFAIK, you _can_ CREATE/DROP, but you can't roll back.
> 
>     -Roberto
> -- 
> +----| http://fslc.usu.edu USU Free Software & GNU/Linux Club|------+
>   Roberto Mello - Computer Science, USU - http://www.brasileiro.net 
>       http://www.sdl.usu.edu - Space Dynamics Lab, Web Developer    
> "Carrier detected." Go to the dentist...
>