Re: views, queries, and locks
От | Jon Nelson |
---|---|
Тема | Re: views, queries, and locks |
Дата | |
Msg-id | CAKuK5J19L-4TEyFPdemwOhDD9dS2Ls2mJzQx+111n-iNtVxU6Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: views, queries, and locks (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: views, queries, and locks
|
Список | pgsql-general |
On Wed, Apr 4, 2012 at 9:01 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Why aren't you using a standard partitioned table, cf > http://www.postgresql.org/docs/9.1/static/ddl-partitioning.html Because I'm adding "scalar" (constant-value) columns to the view like this: SELECT * from tableA, DATE 'date string here' as date_column UNION ALL SELECT * from tableB, DATE 'date string here' as date_column for hundreds or even thousands of tables. > The stuff associated with table inheritance is actually designed for the > use-case of adding and dropping child tables, and we might consider any > problems therein as something to be fixed. Whereas the fact that > changing a view locks it is unlikely to change. I'm not asking for "don't lock views when changing them" I'm asking "does the lock on the view still have to be held after the query rewrite takes place" (since views are little more than rules?). -- Jon
В списке pgsql-general по дате отправления: