Skip site navigation (1) Skip section navigation (2)

Re: Re: [GENERAL] A rare error

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: "Kevin O'Gorman" <kogorman(at)pacbell(dot)net>
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: Re: [GENERAL] A rare error
Date: 2000-10-28 03:57:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> (SELECT * INTO newtable FROM table1) UNION (SELECT * FROM table2);
Possibly a silly (and definitely not standards-conformant) suggestion:

Maybe grammar should be amended to allow for
(SELECT * FROM table1) UNION (SELECT * FROM table2) INTO newtable


 (select_expr) union (union_expr) [into into_table]

> Notice the INTO?  Doesn't this seem like an odd place for it, in what
> appears to be a subordinate query?  Where else would it go?  How would
> it grab you in an expression with five or more levels of parens?
> How about five levels of parens and a complicated targetlist before
> you get to the INTO?
> What I'm suggesting is that the parens be allowed only on the right
> hand side of the set operations.  How does that strike you?
> > 
> >                         regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-10-28 04:03:28
Subject: Re: Can't import date using copy
Previous:From: Alex PilosovDate: 2000-10-28 03:39:29
Subject: Re: Summary: what to do about INET/CIDR

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group