Re: [HACKERS] COPY view
Zoltan Boszormenyi <zboszor@dunaweb.hu>
From: Zoltan Boszormenyi <zboszor@dunaweb.hu>
To: Zoltan Boszormenyi <zboszor@dunaweb.hu>, Bruce Momjian <bruce@momjian.us>, Andrew Dunstan <andrew@dunslane.net>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Treat <xzilla@users.sourceforge.net>, pgsql-hackers@postgresql.org, Hans-Juergen Schoenig <hs@cybertec.at>, Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>, "Jim C. Nasby" <jnasby@pervasive.com>, Bruce Momjian <pgman@candle.pha.pa.us>, List pgsql-patches <pgsql-patches@postgresql.org>
Date: 2006-08-23T16:15:04Z
Lists: pgsql-hackers
Alvaro Herrera írta: > Zoltan Boszormenyi wrote: > > >> OK, here's my current version. The reference leak is fixed. >> But as my testcase shows, it only works for single selects >> currently. The parser accepts it but COPY doesn't produce >> the expected output. Please, suggest a solution. >> > > I'm not sure I agree with the approach of creating a fake "SELECT * FROM > foo" in analyze.c in the relation case and passing it back to the parser > to create a Query node. That's not there in the original code and you > shouldn't need it. Just let the case where COPY gets a relation > continue to handle it as it does today, and add a separate case for the > SELECT. > The exact same code was there, e.g. parse and rewrite "SELECT * FROM view" just not in analyze.c. I will try without it, though. > That doesn't help you with the UNION stuff though. > :-(