drop table <name> cascade|restrict
| From: | Daniel Convissor | Date: | Mon, 01 Nov 2004 02:48:42 +0000 |
| Subject: | drop table <name> cascade|restrict | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-34181@lists.php.net to get a copy of this message | ||
Hey Lukas:
Wondering what you think about the following...
FrontBase (and the SQL 99 standard) requires DROP TABLE statements
(and DROP SCHEMA, among others) to contain a scope (or whatever it's
called) at the end. The sope is either CASCADE or RESTRICT. No other
DBMS requires it. I don't know which allow it, but I'll check.
So, for now, I've been tweaking tests manually, to check the phptype
and then adding the scope to the end as needed. I'm thinking it might
be helpful for users if we added a step to fbsql's modify query method
that would check for drop table statements that didn't have the scope
and then add it if it wasn't there. The default would add RESTRICT,
which is apparently more widely accepted and less likely to cause
havoc on a database. An option via setOption() will allow the choice
to be CASCADE for those that demand it.
Considering that anyone using DB with FrontBase already has put the
cascade/restrict in all drop table statements that don't have it
because FB rejects queries without it.
So, this modification won't cause them problems and will help
unsupsecting users who try switching from some other DBMS to
FrontBase.
Your thoughts?
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409