Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA64364 for ; Thu, 23 Dec 1999 10:37:53 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA06509; Thu, 23 Dec 1999 10:36:15 -0500 (EST) To: "D'Arcy" "J.M." Cain cc: enrique@xpress.es (Enrique Rodriguez Lazaro), pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Ghost insert In-reply-to: References: Comments: In-reply-to "D'Arcy" "J.M." Cain message dated "Thu, 23 Dec 1999 09:41:30 -0500" Date: Thu, 23 Dec 1999 10:36:15 -0500 Message-ID: <6506.945963375@sss.pgh.pa.us> From: Tom Lane "D'Arcy" "J.M." Cain writes: > Thus spake Enrique Rodriguez Lazaro >> I can't do a simple 'insert' from libpq. > Just guessing here but is it possible that clientes is a view and you are > seeing the underlying table when you select after the insert? Oooh, good thought --- but you are explaining it backwards. If clientes was made with CREATE VIEW, then an INSERT into clientes would in fact insert data into clientes --- but you'd never see it again, because any SELECT from clientes would be redirected to whatever the view is of. (I've been burnt by that myself ;-).) If you want to insert/update on a view, you need to provide ON INSERT, ON UPDATE, ON DELETE rules that tell how to modify the underlying tables appropriately. The system will *not* try to intuit these for you. regards, tom lane