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. 

 Lefteris


On 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