Skip site navigation (1) Skip section navigation (2)

DDL in EDB-SPL

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Ahsan Hadi <ahsan(dot)hadi(at)enterprisedb(dot)com>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>, Faiz Husain <faiz(dot)husain(at)enterprisedb(dot)com>, Hope Jiang <hope(dot)jiang(at)enterprisedb(dot)com>
Subject: DDL in EDB-SPL
Date: 2007-12-12 13:40:52
Message-ID: 475FE4E4.1020201@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-patches
While looking at the package function precedence problem, I bumped into 
another unrelated bug:

According to a quick Google search, Oracle doesn't accept DDL in PL/SQL; 
you have to use EXECUTE IMMEDIATE to do that. Trying to run DDL in the 
edb-spl fails with a bizarre error message. For example, for CREATE 
TABLE footable (full test case attached):
ERROR:  syntax error at or near "footable"
LINE 1: CREATE footable2 (id integer)

So the TABLE token seems to be stripped away somewhere. This begs the 
question of what happens with CREATE TEMPORARY TABLE. Lo and behold, it 
does what you might've guessed, kind of. TEMPORARY is stripped away, 
leaving just "CREATE TABLE <tablename>". However, we've set the package 
namespace as the special namespace, and that's the current "default 
creation namespace". Therefore the table gets created inside the package 
namespace.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Attachment: p8.sql
Description: text/x-sql (243 bytes)

Responses

pgsql-patches by date

Next:From: Pavel StehuleDate: 2007-12-12 13:49:39
Subject: Re: DDL in EDB-SPL
Previous:From: Tom LaneDate: 2007-12-12 02:52:24
Subject: Proposed patch to avoid translation risks in psql's \d commands

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group