|
18 | 18 | * Portions Copyright (c) 2000-2001, PostgreSQL Global Development Group |
19 | 19 | * Copyright 1999 Jan Wieck |
20 | 20 | * |
21 | | - * $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.30 2001/11/1200:46:36 tgl Exp $ |
| 21 | + * $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.31 2001/11/1206:09:09 momjian Exp $ |
22 | 22 | * |
23 | 23 | * ---------- |
24 | 24 | */ |
@@ -232,10 +232,10 @@ RI_FKey_check(PG_FUNCTION_ARGS) |
232 | 232 |
|
233 | 233 | /* --------- |
234 | 234 | * The query string built is |
235 | | - *SELECToid FROM ONLY <pktable> |
| 235 | + *SELECT1 FROM ONLY <pktable> |
236 | 236 | * ---------- |
237 | 237 | */ |
238 | | -sprintf(querystr,"SELECToid FROM ONLY \"%s\" FOR UPDATE OF \"%s\"", |
| 238 | +sprintf(querystr,"SELECT1 FROM ONLY \"%s\" FOR UPDATE OF \"%s\"", |
239 | 239 | tgargs[RI_PK_RELNAME_ARGNO], |
240 | 240 | tgargs[RI_PK_RELNAME_ARGNO]); |
241 | 241 |
|
@@ -376,14 +376,14 @@ RI_FKey_check(PG_FUNCTION_ARGS) |
376 | 376 |
|
377 | 377 | /* ---------- |
378 | 378 | * The query string built is |
379 | | - *SELECToid FROM ONLY <pktable> WHERE pkatt1 = $1 [AND ...] |
| 379 | + *SELECT1 FROM ONLY <pktable> WHERE pkatt1 = $1 [AND ...] |
380 | 380 | * The type id's for the $ parameters are those of the |
381 | 381 | * corresponding FK attributes. Thus, SPI_prepare could |
382 | 382 | * eventually fail if the parser cannot identify some way |
383 | 383 | * how to compare these two types by '='. |
384 | 384 | * ---------- |
385 | 385 | */ |
386 | | -sprintf(querystr,"SELECToid FROM ONLY \"%s\"", |
| 386 | +sprintf(querystr,"SELECT1 FROM ONLY \"%s\"", |
387 | 387 | tgargs[RI_PK_RELNAME_ARGNO]); |
388 | 388 | querysep="WHERE"; |
389 | 389 | for (i=0;i<qkey.nkeypairs;i++) |
@@ -609,14 +609,14 @@ RI_FKey_noaction_del(PG_FUNCTION_ARGS) |
609 | 609 |
|
610 | 610 | /* ---------- |
611 | 611 | * The query string built is |
612 | | - *SELECToid FROM ONLY <fktable> WHERE fkatt1 = $1 [AND ...] |
| 612 | + *SELECT1 FROM ONLY <fktable> WHERE fkatt1 = $1 [AND ...] |
613 | 613 | * The type id's for the $ parameters are those of the |
614 | 614 | * corresponding PK attributes. Thus, SPI_prepare could |
615 | 615 | * eventually fail if the parser cannot identify some way |
616 | 616 | * how to compare these two types by '='. |
617 | 617 | * ---------- |
618 | 618 | */ |
619 | | -sprintf(querystr,"SELECToid FROM ONLY \"%s\"", |
| 619 | +sprintf(querystr,"SELECT1 FROM ONLY \"%s\"", |
620 | 620 | tgargs[RI_FK_RELNAME_ARGNO]); |
621 | 621 | querysep="WHERE"; |
622 | 622 | for (i=0;i<qkey.nkeypairs;i++) |
@@ -823,14 +823,14 @@ RI_FKey_noaction_upd(PG_FUNCTION_ARGS) |
823 | 823 |
|
824 | 824 | /* ---------- |
825 | 825 | * The query string built is |
826 | | - *SELECToid FROM ONLY <fktable> WHERE fkatt1 = $1 [AND ...] |
| 826 | + *SELECT1 FROM ONLY <fktable> WHERE fkatt1 = $1 [AND ...] |
827 | 827 | * The type id's for the $ parameters are those of the |
828 | 828 | * corresponding PK attributes. Thus, SPI_prepare could |
829 | 829 | * eventually fail if the parser cannot identify some way |
830 | 830 | * how to compare these two types by '='. |
831 | 831 | * ---------- |
832 | 832 | */ |
833 | | -sprintf(querystr,"SELECToid FROM ONLY \"%s\"", |
| 833 | +sprintf(querystr,"SELECT1 FROM ONLY \"%s\"", |
834 | 834 | tgargs[RI_FK_RELNAME_ARGNO]); |
835 | 835 | querysep="WHERE"; |
836 | 836 | for (i=0;i<qkey.nkeypairs;i++) |
@@ -1450,14 +1450,14 @@ RI_FKey_restrict_del(PG_FUNCTION_ARGS) |
1450 | 1450 |
|
1451 | 1451 | /* ---------- |
1452 | 1452 | * The query string built is |
1453 | | - *SELECToid FROM ONLY <fktable> WHERE fkatt1 = $1 [AND ...] |
| 1453 | + *SELECT1 FROM ONLY <fktable> WHERE fkatt1 = $1 [AND ...] |
1454 | 1454 | * The type id's for the $ parameters are those of the |
1455 | 1455 | * corresponding PK attributes. Thus, SPI_prepare could |
1456 | 1456 | * eventually fail if the parser cannot identify some way |
1457 | 1457 | * how to compare these two types by '='. |
1458 | 1458 | * ---------- |
1459 | 1459 | */ |
1460 | | -sprintf(querystr,"SELECToid FROM ONLY \"%s\"", |
| 1460 | +sprintf(querystr,"SELECT1 FROM ONLY \"%s\"", |
1461 | 1461 | tgargs[RI_FK_RELNAME_ARGNO]); |
1462 | 1462 | querysep="WHERE"; |
1463 | 1463 | for (i=0;i<qkey.nkeypairs;i++) |
@@ -1670,14 +1670,14 @@ RI_FKey_restrict_upd(PG_FUNCTION_ARGS) |
1670 | 1670 |
|
1671 | 1671 | /* ---------- |
1672 | 1672 | * The query string built is |
1673 | | - *SELECToid FROM ONLY <fktable> WHERE fkatt1 = $1 [AND ...] |
| 1673 | + *SELECT1 FROM ONLY <fktable> WHERE fkatt1 = $1 [AND ...] |
1674 | 1674 | * The type id's for the $ parameters are those of the |
1675 | 1675 | * corresponding PK attributes. Thus, SPI_prepare could |
1676 | 1676 | * eventually fail if the parser cannot identify some way |
1677 | 1677 | * how to compare these two types by '='. |
1678 | 1678 | * ---------- |
1679 | 1679 | */ |
1680 | | -sprintf(querystr,"SELECToid FROM ONLY \"%s\"", |
| 1680 | +sprintf(querystr,"SELECT1 FROM ONLY \"%s\"", |
1681 | 1681 | tgargs[RI_FK_RELNAME_ARGNO]); |
1682 | 1682 | querysep="WHERE"; |
1683 | 1683 | for (i=0;i<qkey.nkeypairs;i++) |
|