Probably it is of interest for jou, or i did something very stupid:
I had a little piece of code who works fine up till know, just after
installing 
the version 6.5.3 i got the message 'parse error near union'


create table work as
	select * from opdracht
	union
	select * from opdrachtproost

I know i can solve the problem with 
	insert into work in stead of the union keyword, but it is enoying that all
the programs had to be recompiled

many thanks, its a good product

Frans



Fri, 12 Nov 1999 01:10:06 +0100
Frans Van Elsacker <fve@atbib.be>
union problem version 6.5.3
Frans Van Elsacker <fve@atbib.be> writes:
> I had a little piece of code who works fine up till know, just after
> installing 
> the version 6.5.3 i got the message 'parse error near union'

> create table work as
> 	select * from opdracht
> 	union
> 	select * from opdrachtproost

Hmm, the grammar has

CreateAsStmt:  CREATE OptTemp TABLE relation_name OptCreateAs AS SubSelect

and SubSelect doesn't allow unions.  This is overly restrictive,
I agree, but I thought it had been that way for a good while.
What version were you using before?

			regards, tom lane

Fri, 12 Nov 1999 10:34:45 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] union problem version 6.5.3 

thanks for your quick answer,

Our earlier version was postgresql 6.4.2

Regards, Frans





At 10:34 12/11/99 -0500, Tom Lane wrote:
>Frans Van Elsacker <fve@atbib.be> writes:
>> I had a little piece of code who works fine up till know, just after
>> installing 
>> the version 6.5.3 i got the message 'parse error near union'
>
>> create table work as
>> 	select * from opdracht
>> 	union
>> 	select * from opdrachtproost
>
>Hmm, the grammar has
>
>CreateAsStmt:  CREATE OptTemp TABLE relation_name OptCreateAs AS SubSelect
>
>and SubSelect doesn't allow unions.  This is overly restrictive,
>I agree, but I thought it had been that way for a good while.
>What version were you using before?
>
>			regards, tom lane
>
>************
>
>


Sat, 13 Nov 1999 00:31:30 +0100
Frans Van Elsacker <fve@atbib.be>
Re: [HACKERS] union problem version 6.5.3 
Frans Van Elsacker <fve@atbib.be> writes:
> Our earlier version was postgresql 6.4.2

OK, I thought the change was older than that.  It probably got into 6.5
as a side-effect of incorporating the INTERSECT/EXCEPT feature.  Anyway,
we ought to try to restore the old functionality.

			regards, tom lane

>> Hmm, the grammar has
>> 
>> CreateAsStmt:  CREATE OptTemp TABLE relation_name OptCreateAs AS SubSelect
>> 
>> and SubSelect doesn't allow unions.  This is overly restrictive,
>> I agree, but I thought it had been that way for a good while.
>> What version were you using before?

Fri, 12 Nov 1999 18:58:59 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] union problem version 6.5.3 
>>> Hmm, the grammar has
>>> 
>>> CreateAsStmt:  CREATE OptTemp TABLE relation_name OptCreateAs AS SubSelect
>>> 
>>> and SubSelect doesn't allow unions.  This is overly restrictive,

As far as I can tell, it should work to just change the above line in
src/backend/parser/gram.y to

CreateAsStmt:  CREATE OptTemp TABLE relation_name OptCreateAs AS SelectStmt

I am doing this in current sources right now.  I have not tried it in
REL6_5, but if the problem is getting in your way then give it a try...

			regards, tom lane

Sun, 14 Nov 1999 13:47:13 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] union problem version 6.5.3 