pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Péder <dpeder@infoset.cz>
To: 'pgsql-hackers@postgresql.org' <pgsql-hackers@postgresql.org>
To: 'pgsql-sql@postgresql.org' <pgsql-sql@postgresql.org>
Subject: insertable views - not copy-able ?
Date: Sun, 17 Oct 1999 21:56:45 +0100
Message-ID: <01BF18EA.81DB25A0@Dan> (raw)

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;
Enter info followed by a newline
End with a backslash and a period on a line by itself.
>> jim
>> john
>> jack
>> \.
mydb=> select MYVIEW.*;
name
----
(0 rows)


--
dan peder
dpeder@infoset.cz




view thread (3+ messages)  latest in thread

Message-ID: <01BF18EA.81DB25A0@Dan>
Permalink:  ../01BF18EA.81DB25A0@Dan/
Also on:    postgresql.org/message-id/01BF18EA.81DB25A0@Dan

 · 

reply

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: dpeder@infoset.cz, pgsql-hackers@postgresql.org
  Subject: Re: insertable views - not copy-able ?
  In-Reply-To: <01BF18EA.81DB25A0@Dan>
  References: <01BF18EA.81DB25A0@Dan>

* 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