Thanks, Mike! This is the most lucid, concise explanation of so many
postgresql "gotchas" I've seen yet.
Mike Mascari wrote:
> 2. Using views created with large queries - Views use the
> rewrite system and rules to rewrite a query against it to
> properly fetch data from the underlying tables. Because
> there is currently a limit on the size of a single database
> record (8192 bytes), the queries associated with views can
> only be so big. ...
One additional anomaly as of 6.5.2 regarding backup and recovery...
If one simply compares the before/after output of load/dump scripts, it can at
first appear that pg_dump will occasionally convert a view built on non-empty
tables into a table itself with zero records. This happens during the
following backup test sequence for me:
% pg_dump -d mydb > db.out
% destroydb mydb
% createdb mydb
% psql -d mydb < db.out
% pg_dump -d mydb > db2.out
% diff db.out db2.out
This is because a view _is_ actually implemented as a table combined with a
redirecting rule, and thus not a problem. See the following for details.
http://www.deja.com/getdoc.xp?AN=559228857
Cheers,
Ed Loehr