/[pgswish]/trunk/pgswish.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/pgswish.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by dpavlin, Sat Feb 19 00:59:08 2005 UTC revision 10 by dpavlin, Sat Feb 19 11:39:11 2005 UTC
# Line 10  Line 10 
10   * NOTES:   * NOTES:
11   * - clear structures with memset to support hash indexes (who whould like   * - clear structures with memset to support hash indexes (who whould like
12   *   to create hash index on table returned from function?)   *   to create hash index on table returned from function?)
13     * - number of returned rows is set by PostgreSQL evaluator, see:
14     *   http://archives.postgresql.org/pgsql-hackers/2005-02/msg00546.php
15   *   *
16   * Based on:   * Based on:
17   * - C example from PostgreSQL documentation (BSD licence)   * - C example from PostgreSQL documentation (BSD licence)
# Line 79  Datum pgswish(PG_FUNCTION_ARGS) { Line 81  Datum pgswish(PG_FUNCTION_ARGS) {
81                                    
82                  if ( SwishError( swish_handle ) ) error_or_abort( swish_handle );                  if ( SwishError( swish_handle ) ) error_or_abort( swish_handle );
83                  /* set ranking scheme. default is 0 */                  /* set ranking scheme. default is 0 */
84                  SwishRankScheme( swish_handle, 1 );                  SwishRankScheme( swish_handle, 0 );
85    
86                  /* Check for errors after every call */                  /* Check for errors after every call */
87                  if ( SwishError( swish_handle ) )                  if ( SwishError( swish_handle ) )
# Line 87  Datum pgswish(PG_FUNCTION_ARGS) { Line 89  Datum pgswish(PG_FUNCTION_ARGS) {
89    
90                  elog(INFO, "pgswish: SwishQuery(%s)", query);                  elog(INFO, "pgswish: SwishQuery(%s)", query);
91                  /* Here's a short-cut to searching that creates a search object and searches at the same time */                  /* Here's a short-cut to searching that creates a search object and searches at the same time */
 elog(INFO,"## FIXME: SwishQuery kills back-end?");  
92                  results = SwishQuery( swish_handle, query);                  results = SwishQuery( swish_handle, query);
 elog(INFO,"## FIXME: no...");  
93                  if ( SwishError( swish_handle ) ) error_or_abort( swish_handle );                  if ( SwishError( swish_handle ) ) error_or_abort( swish_handle );
94    
95                  /* total number of tuples to be returned */                  /* total number of tuples to be returned */

Legend:
Removed from v.9  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26