Search Postgresql Archives

Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alvaro Herrera <alvherre@xxxxxxxxx> writes:
> On Tue, May 31, 2005 at 03:43:56PM -0400, Tom Lane wrote:
>> OK, next question: is this a bug fix we should back-patch into 7.4,
>> or just change it in HEAD?

> I guess apply only in HEAD, and provide the patch for MLikharev so he
> can solve his immediate problem.

Done.  Here is the patch (against CVS tip, but it should apply with
some fuzz in 8.0 or 7.4).

			regards, tom lane


*** src/backend/executor/spi.c.orig	Fri May  6 15:59:49 2005
--- src/backend/executor/spi.c	Thu Jun  9 16:59:37 2005
***************
*** 1497,1502 ****
--- 1497,1503 ----
  _SPI_pquery(QueryDesc *queryDesc, long tcount)
  {
  	int			operation = queryDesc->operation;
+ 	CommandDest	origDest = queryDesc->dest->mydest;
  	int			res;
  	Oid			save_lastoid;
  
***************
*** 1548,1554 ****
  
  	ExecutorEnd(queryDesc);
  
! 	if (queryDesc->dest->mydest == SPI)
  	{
  		SPI_processed = _SPI_current->processed;
  		SPI_lastoid = save_lastoid;
--- 1549,1556 ----
  
  	ExecutorEnd(queryDesc);
  
! 	/* Test origDest here so that SPI_processed gets set in SELINTO case */
! 	if (origDest == SPI)
  	{
  		SPI_processed = _SPI_current->processed;
  		SPI_lastoid = save_lastoid;

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux