Forgot your password?
typodupeerror
Databases

PostgreSQL 9.3 Will Feature UPDATEable Views 68

Posted by Unknown Lamer
from the long-overdue-features dept.
Picking up work abandoned around Postgres 8.2, a patch recently hit the PostgreSQL 9.3 branch that adds SQL-92 automatically updatable views. For many common cases, you will no longer have to write hairy triggers to fake UPDATE support (e.g. if you have a view that hides a few internal columns). Limitations currently include only supporting views with at most one table in the FROM clause. This complements the under-advertised INSTEAD OF trigger support added in 9.1.
This discussion has been archived. No new comments can be posted.

PostgreSQL 9.3 Will Feature UPDATEable Views

Comments Filter:
  • Re:Good use-case? (Score:5, Insightful)

    by DragonWriter (970822) on Wednesday December 12, 2012 @02:17PM (#42263117)

    Why would you want to wrap every table in your database in boilerplate?

    Other than in the case of a single-application database (and, even then, only in fairly simple cases), using views rather than base tables for application isn't wrapping the tables in boilerplate.

    All application code is going to be going through stored procedures anyway

    The "all application code should go through stored procedures" rule is, as I understand it, a pragmatic rule that was recommended largely because most actual database systems at the time that rule became popular had view support that fell far enough short of the ideal in the relational model that the better and older "all application code should run against views" approach was generally impractical (helped by the fact that it let you have application programmers that didn't understand anything about relational databases.)

  • Re:Good use-case? (Score:2, Insightful)

    by Anonymous Coward on Wednesday December 12, 2012 @02:28PM (#42263249)

    All application code is going to be going through stored procedures anyway

    Because the DBA is being paid the big bucks to write stored procedures for every possible way someone might try to whack the database with Crystal Reports.

Make headway at work. Continue to let things deteriorate at home.

Working...