[Ur] Fwd: [Ur/Web 0000181]: No support for dml DELETE FROM without WHERE clause

Sergey Mironov grrwlf at gmail.com
Sun Aug 24 11:06:04 EDT 2014


(Looks like Mantis doesn't allow commenting closed tickets, so I'll
post to the list)

(DELETE .. WHERE TRUE ) is OK in general, it's only problem is that it
is completely non-obvious. I think dropping a note in a compiler's
error message will be a good help here.


---------- Forwarded message ----------
From: Mantis Bug Tracker <mantis at impredicative.com>
Date: 2014-08-24 18:52 GMT+04:00
Subject: [Ur/Web 0000181]: No support for dml DELETE FROM without WHERE clause
To: grrwlf at gmail.com



The following issue has been CLOSED
======================================================================
http://www.impredicative.com/mantis/view.php?id=181
======================================================================
Reported By:                grwlf
Assigned To:
======================================================================
Project:                    Ur/Web
Issue ID:                   181
Category:
Reproducibility:            always
Severity:                   tweak
Priority:                   low
Status:                     closed
Resolution:                 open
Fixed in Version:
======================================================================
Date Submitted:             2014-08-23 13:47 EDT
Last Modified:              2014-08-24 10:52 EDT
======================================================================
Summary:                    No support for dml DELETE FROM without WHERE clause
Description:
For example, the following code would result in an error

table channels : {Channel: channel int}

task initialize = fn _ => dml( DELETE FROM channels )

Please, consider adding support for such syntax.
======================================================================

----------------------------------------------------------------------
 (0000334) adamc (administrator) - 2014-08-24 10:52
 http://www.impredicative.com/mantis/view.php?id=181#c334
----------------------------------------------------------------------
While Ur/Web's SQL interface in general was designed to expose the underlying
language faithfully, I decided to make an improvement in this case. :)

In particular, it scares me that the default of 'DELETE' is to nuke all your
data.  I prefer to be forced to write 'WHERE TRUE' if I really want to delete
everything.

It's possible I could be convinced to add the scary default back in, but for now
I'll mark this issue as closed.

Issue History
Date Modified    Username       Field                    Change
======================================================================
2014-08-23 13:47 grwlf          New Issue
2014-08-24 10:52 adamc          Note Added: 0000334
2014-08-24 10:52 adamc          Status                   new => closed
======================================================================



More information about the Ur mailing list