qsort.patch

text/plain

Filename: qsort.patch
Type: text/plain
Part: 1
Message: Re: [HACKERS] Some cleanups/enhancements

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: context
File+
backend/lib/Makefile 1 1
backend/optimizer/geqo/geqo_pool.c 1 4
backend/optimizer/path/predmig.c 1 2
backend/storage/page/bufpage.c 1 3
*** backend/optimizer/geqo/geqo_pool.c.orig	Mon Mar 16 21:40:24 1998
--- backend/optimizer/geqo/geqo_pool.c	Mon Mar 16 21:41:50 1998
***************
*** 35,42 ****
  #include "optimizer/clauses.h"
  #include "optimizer/cost.h"
  
- #include "lib/qsort.h"
- 
  #include "optimizer/geqo_gene.h"
  #include "optimizer/geqo.h"
  #include "optimizer/geqo_pool.h"
--- 35,40 ----
***************
*** 127,134 ****
  void
  sort_pool(Pool *pool)
  {
! 	pg_qsort(pool->data, pool->size, sizeof(Chromosome), compare);
! 
  }
  
  /*
--- 125,131 ----
  void
  sort_pool(Pool *pool)
  {
! 	qsort(pool->data, pool->size, sizeof(Chromosome), compare);
  }
  
  /*
*** backend/optimizer/path/predmig.c.orig	Mon Mar 16 21:41:30 1998
--- backend/optimizer/path/predmig.c	Mon Mar 16 21:41:34 1998
***************
*** 47,53 ****
  #include "optimizer/cost.h"
  #include "optimizer/keys.h"
  #include "optimizer/tlist.h"
- #include "lib/qsort.h"
  
  #define is_clause(node) (get_cinfo(node))		/* a stream node
  												 * represents a clause
--- 47,52 ----
***************
*** 698,704 ****
  		nodearray[i] = tmp;
  
  	/* sort the array */
! 	pg_qsort(nodearray, num, sizeof(LispValue), xfunc_stream_compare);
  
  	/* paste together the array elements */
  	output = nodearray[num - 1];
--- 697,703 ----
  		nodearray[i] = tmp;
  
  	/* sort the array */
! 	qsort(nodearray, num, sizeof(LispValue), xfunc_stream_compare);
  
  	/* paste together the array elements */
  	output = nodearray[num - 1];
*** backend/storage/page/bufpage.c.orig	Mon Mar 16 21:42:09 1998
--- backend/storage/page/bufpage.c	Mon Mar 16 21:42:24 1998
***************
*** 24,31 ****
  #include "utils/memutils.h"
  #include "storage/bufpage.h"
  
- #include "lib/qsort.h"
- 
  static void
  PageIndexTupleDeleteAdjustLinePointers(PageHeader phdr,
  									   char *location, Size size);
--- 24,29 ----
***************
*** 330,336 ****
  		}
  
  		/* sort itemIdSortData array... */
! 		pg_qsort((char *) itemidbase, nused, sizeof(struct itemIdSortData),
  				 itemidcompare);
  
  		/* compactify page */
--- 328,334 ----
  		}
  
  		/* sort itemIdSortData array... */
! 		qsort((char *) itemidbase, nused, sizeof(struct itemIdSortData),
  				 itemidcompare);
  
  		/* compactify page */
*** backend/lib/Makefile.orig	Mon Mar 16 21:42:40 1998
--- backend/lib/Makefile	Mon Mar 16 21:42:50 1998
***************
*** 15,21 ****
  
  CFLAGS+=$(INCLUDE_OPT)
  
! OBJS = bit.o fstack.o hasht.o lispsort.o qsort.o stringinfo.o dllist.o
  
  all: SUBSYS.o
  
--- 15,21 ----
  
  CFLAGS+=$(INCLUDE_OPT)
  
! OBJS = bit.o fstack.o hasht.o lispsort.o stringinfo.o dllist.o
  
  all: SUBSYS.o