you can't drop a table if it contains data? i am confused
On Friday, December 18, 2015, Lefteris <lsidir@gmail.com> wrote:
Kind of yes, but then again you can not drop any table (not just the read-only ones) if it contains data.On Fri, Dec 18, 2015 at 2:12 PM, Anthony Damico <ajdamico@gmail.com> wrote:alright, that seems like a small bug then. if a table has zero records, it cannot be protected but if it has one record, it can. thanks all
https://www.monetdb.org/bugzilla/show_bug.cgi?id=3889On Fri, Dec 18, 2015 at 7:59 AM, Lefteris <lsidir@gmail.com> wrote:It is read-only, not write protected:)I am joking, but we use the read-only property to create non-updatable indeces and perform other optimization that would be impossible to do if there could be updates, appends, inserts etc. into the table.Now, if the read-only statement means also that you can not drop the table, that is debatable.Trying creating a table, add one row of values, then make it a read-only and then try to drop it. My bet is it will not be dropped. Then try to delete the row while the table is still read-only, you should not be able.LefterisOn Fri, Dec 18, 2015 at 1:47 PM, Anthony Damico <ajdamico@gmail.com> wrote:_______________________________________________dropping it isn't updating it?
On Friday, December 18, 2015, Guillaume Savary <guillaume.savary@securactive.net> wrote:
Le 17/12/2015 20:54, Anthony Damico a écrit :
sql>create table my_table as select 1 with data;
operation successful (57.729ms)
sql>alter table my_table set read only;
operation successful (5.488ms)
sql>alter table my_table add column my_column integer;
operation successful (10.563ms)
sql>drop table my_table;
operation successful (6.075ms)
Doc: "An individual table can be protected using the READ ONLY mode. All attempts to update are flagged as a SQL error."
As you did not "update" the data, it seems normal I guess.
-- Guillaume Savary Securactive R&D
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list