From: wieck@debis.com
To: dpeder@infoset.cz
Cc: pgsql-hackers@postgreSQL.org
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [HACKERS] insertable views - not copy-able ?
Date: Mon, 18 Oct 1999 10:53:00 +0200 (MET DST)
Message-ID: <m11d8XM-0003kLC@orion.SAPserv.Hamburg.dsh.de> (raw)
In-Reply-To: <01BF18EA.81DB25A0@Dan>
>
> what about this:
> ( it would be nice to have it working, specially for copying values from files into table with default fields, having the default fields doing their job or initialising tables using reduced set of columns )
>
> mydb=> create sequence MYSEQ;
> CREATE
> mydb=> create table MYTAB ( ID int4 default nextval('MYSEQ'), NAME text );
> CREATE
> mydb=> create view MYVIEW as select name from MYTAB;
> CREATE
> mydb=> copy MYVIEW from stdin;
First this setup wouldn't work with INSERT too. The INSTEAD
rule for INSERT is missing. Second COPY isn't a rewritable
statement, and it will not become such since only commands
that have a rangetable and a targetlist can be handled by the
rewriter at all.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: wieck@debis.com, dpeder@infoset.cz, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] insertable views - not copy-able ?
In-Reply-To: <m11d8XM-0003kLC@orion.SAPserv.Hamburg.dsh.de>
References: <01BF18EA.81DB25A0@Dan> <m11d8XM-0003kLC@orion.SAPserv.Hamburg.dsh.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox