RE: SELECT INTO question

2019-07-25 Thread Kevin Brannen
-Original Message- From: Tom Lane Sent: Thursday, July 25, 2019 2:47 PM To: Adrian Klaver Cc: Kevin Brannen ; pgsql-generallists.postgresql.org Subject: Re: SELECT INTO question Adrian Klaver mailto:adrian.kla...@aklaver.com>> writes: > On 7/25/19 12:23 PM, Kevin Bran

Re: SELECT INTO question

2019-07-25 Thread Tom Lane
Adrian Klaver writes: > On 7/25/19 12:23 PM, Kevin Brannen wrote: >> We're trying to understand what happened with a SELECT INTO. The problem >> can be see with this example: >> >> nms=# select into t2 from t1; >> SELECT 5 >> # select * from t2; >> -- >> (5 rows) > The list of output expression

Re: SELECT INTO question

2019-07-25 Thread Adrian Klaver
On 7/25/19 12:23 PM, Kevin Brannen wrote: Hi, We’re trying to understand what happened with a SELECT INTO. The problem can be see with this example: # create table t1 (id int, v int); CREATE TABLE # insert into t1 (select x, x from generate_series(1, 5) as g(x)); INSERT 0 5 # select * fro

SELECT INTO question

2019-07-25 Thread Kevin Brannen
Hi, We're trying to understand what happened with a SELECT INTO. The problem can be see with this example: # create table t1 (id int, v int); CREATE TABLE # insert into t1 (select x, x from generate_series(1, 5) as g(x)); INSERT 0 5 # select * from t1; id | v + 1 | 1 2 | 2 3 |