|
Re: Problems with insert rule called from plpython: msg#00060db.postgresql.bugs
Pavel Hanak <hanak@xxxxxxxxxxx> writes: > Now calling "select testfun()" shows this fatal error: > FATAL: SPI: improper call to spi_dest_setup Hm, I'm glad I put in that test --- it exposed a problem. Here is the patch for 7.3. regards, tom lane *** src/backend/executor/spi.c.orig Wed Jan 29 10:24:57 2003 --- src/backend/executor/spi.c Fri Feb 14 16:09:38 2003 *************** *** 1097,1102 **** --- 1097,1111 ---- else canSetResult = false; + /* Reset state if can set result */ + if (canSetResult) + { + SPI_processed = 0; + SPI_lastoid = InvalidOid; + SPI_tuptable = NULL; + _SPI_current->tuptable = NULL; + } + if (queryTree->commandType == CMD_UTILITY) { if (IsA(queryTree->utilityStmt, CopyStmt)) *************** *** 1206,1211 **** --- 1215,1229 ---- canSetResult = true; else canSetResult = false; + + /* Reset state if can set result */ + if (canSetResult) + { + SPI_processed = 0; + SPI_lastoid = InvalidOid; + SPI_tuptable = NULL; + _SPI_current->tuptable = NULL; + } if (queryTree->commandType == CMD_UTILITY) { ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Function will not back up on 7.2.3: 00060, Josh Berkus |
|---|---|
| Next by Date: | Re: No migration path for MONEY: 00060, Bruce Momjian |
| Previous by Thread: | Problems with insert rule called from plpythoni: 00060, Pavel Hanak |
| Next by Thread: | porting on ITANIUM2 platform under HP-UX.: 00060, Baffa Mario |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |