From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: syntax for drop if exists |
Date: | 2005-11-14 13:53:59 |
Message-ID: | 437896F7.2000305@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
>Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>
>>The MySQL syntax is actually "drop table if exists foo ...".
>>Implementing this unfortunately generates a shift/reduce conflict,
>>
>>
>
>What did you try exactly? I don't see any fundamental reason for
>a conflict here. You may just need to rearrange the grammar to postpone
>the reduction a bit.
>
>
>
You're right, as usual. I had factored out the IF EXISTS bit into a
seperate rule. When I undid that and instead used 2 rules for DropStmt,
the problem disappeared. (This is because it gives bison more info about
the context of each IF - this has often caught me with bison - I should
have known better).
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-11-14 14:24:52 | Re: outer joins and for update |
Previous Message | rasmusra | 2005-11-14 13:50:22 | Re: PostgreSQL roadmap for 8.2 and beyond. |