|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.54 2001/01/24 19:43:05 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.55 2001/01/27 01:44:20 tgl Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -589,6 +589,20 @@ AddQual(Query *parsetree, Node *qual)
|
589 | 589 | if (qual == NULL)
|
590 | 590 | return;
|
591 | 591 |
|
| 592 | + if (parsetree->commandType == CMD_UTILITY) |
| 593 | + { |
| 594 | + /* |
| 595 | + * Noplace to put the qual on a utility statement. |
| 596 | + * |
| 597 | + * For now, we expect utility stmt to be a NOTIFY, so give a |
| 598 | + * specific error message for that case. |
| 599 | + */ |
| 600 | + if (parsetree->utilityStmt && IsA(parsetree->utilityStmt, NotifyStmt)) |
| 601 | + elog(ERROR, "Conditional NOTIFY is not implemented"); |
| 602 | + else |
| 603 | + elog(ERROR, "Conditional utility statements are not implemented"); |
| 604 | + } |
| 605 | + |
592 | 606 | /* INTERSECT want's the original, but we need to copy - Jan */
|
593 | 607 | copy = copyObject(qual);
|
594 | 608 |
|
@@ -616,6 +630,20 @@ AddHavingQual(Query *parsetree, Node *havingQual)
|
616 | 630 | if (havingQual == NULL)
|
617 | 631 | return;
|
618 | 632 |
|
| 633 | + if (parsetree->commandType == CMD_UTILITY) |
| 634 | + { |
| 635 | + /* |
| 636 | + * Noplace to put the qual on a utility statement. |
| 637 | + * |
| 638 | + * For now, we expect utility stmt to be a NOTIFY, so give a |
| 639 | + * specific error message for that case. |
| 640 | + */ |
| 641 | + if (parsetree->utilityStmt && IsA(parsetree->utilityStmt, NotifyStmt)) |
| 642 | + elog(ERROR, "Conditional NOTIFY is not implemented"); |
| 643 | + else |
| 644 | + elog(ERROR, "Conditional utility statements are not implemented"); |
| 645 | + } |
| 646 | + |
619 | 647 | /* INTERSECT want's the original, but we need to copy - Jan */
|
620 | 648 | copy = copyObject(havingQual);
|
621 | 649 |
|
|
0 commit comments