interesting observatation regarding views and V7.0

Поиск
Список
Период
Сортировка
От Don Baccus
Тема interesting observatation regarding views and V7.0
Дата
Msg-id 3.0.1.32.20000223081725.010c5c90@mail.pacifier.com
обсуждение исходный текст
Ответы Re: [HACKERS] interesting observatation regarding views and V7.0  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
We've already seen how column alias were breaking pg_dump's ability to
restore views unless a table alias were created, fixed now thanks to
Tom's hack.

Here's an observation that's not really a bug report but which is
proving to be an annoyance.

The creation of column aliases for tables referenced by views causes
the rule created on the underlying virtual table to be in some cases
considerably longer than the corresponding rule in V6.5.

In practice, this means that several of the views used in the web
toolkit I'm porting no longer can be created.  In some cases, the
views had changed and I'd assumed that this was the cause, but now
I'm seeing it in a module (ecommerce) that as yet has not been
ported.  I'd ported the data model to 6.5 with no problem, but the
views can't be created in 7.0.  I just tried this yesterday, when
I decided to put some effort into porting the module (it contains
about 2000 lines of PL/SQL which need to be re-written in PL/pgSQL
so it's not entirely a trivial task to move it over).

Seeing that these views - which hadn't changed - and in light of
the column alias vs. pg_dump issue, I realized that the rule
strings are just getting much longer.  

(The error I'm getting is that the tuple size is too long)

Of course, TOAST will solve the problem, but we don't have TOAST
yet.  

I'm assuming Thomas put this in as part of the 'outer join' work.

In my case, I recompiled PG with a blocksize of 16KB rather
than 8KB, which I've been intending to do anyway for the time 
being since the 8KB blocksize causes other limitations on the size
of text vars, i.e. the discussion forum table is limited to about
6KB chars for the message text when the blocksize is 8KB, really
too small.  With TOAST coming in 7.1, I'm sticking with "text"
rather than segmenting messages into a series of rows and kludging
a "solution" by compiling with a 16KB blocksize.

This "fixed" my problem with views, too.

But I thought I'd share my experience with the group.  I don't
know how many folks use views in complex ways, but if many do
quite a few of them will run into the same problem and we'll
probably hear about it.



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: [HACKERS] Cache query (PREPARE/EXECUTE)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: GNU make (Re: [HACKERS] Re: [PATCHES] Patch for more readable parse error messages)