Re: [SQL] Updatable view should truncate table fields

2011-11-12 Thread Jasen Betts
On 2011-11-08, Russell Keane wrote: > > We can extend the table to accept more than 5 characters but the view must = > return 5 characters. > If we try to extend the table to accept, say, 10 characters the view will d= > isplay 10. > If I also cast the view field to 5 characters then any insert wi

Re: [SQL] Updatable view should truncate table fields

2011-11-08 Thread David Johnston
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Russell Keane Sent: Tuesday, November 08, 2011 4:34 PM To: pgsql-sql@postgresql.org Subject: [SQL] Updatable view should truncate table fields Using PostgreSQL 9.0. We have a table which is not accessible

[SQL] Updatable view should truncate table fields

2011-11-08 Thread Russell Keane
Using PostgreSQL 9.0. We have a table which is not accessible by client code. We also have views with rules and triggers to intercept any insert or update statements and write that data in a slightly different format back to the table. A particular field in the table is currently 5 chars but rec

[SQL] Updatable view

2005-06-30 Thread M.D.G. Lange
I have been looking around to get an idea how to make RULES on a VIEW for INSERT , UPDATE and DELETE of a VIEW with an INNER JOIN. First the idea: There are 3 tables, those are related one way or another, combined in this view: pg_user (ok, it's a view really) tblcontacts (with contact informa