16 Mar 2014, 23:46
Eyal golan 2_pragsmall

Eyal Golan (1 post)

Hi, I really like this book and can’t wait progressing to the other DBs (the NoSQL ones).

Regarding the example of holidays VIEW and altering: In p. 31 (PDF), there’s the following update query, which suppose to give an error: UPDATE holidays SET colors = ‘{“red”,”green”}’ where name = ‘Christmas Day’;

Only after RULE it should work.

However, I didn’t get an error and events table was modified correctly. I did not ad the RULE yet.

I am using version 9.3.

So, how did events table modify w/o RULE?

Thanks,

Eyal

30 Jun 2014, 22:00
Generic-user-small

Vijay Ramamurthy (1 post)

This is because the latest version of PostgreSQL (9.3) is the first to support the feature of updating views directly. The book teacher using RULEs as a workaround – but this workaround is unnecessary because of this new feature of 9.3. Long story short, version 9.3 of PostgreSQL made this section of the book outdated and inaccurate.

  You must be logged in to comment