1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-22 14:32:25 +03:00

Thank god for searchable mail archives.

Patch by: wieck@sapserv.debis.de (Jan Wieck)

   One  of  the design rules of PostgreSQL is extensibility. And
   to follow this rule means (at least for me) that there should
   not  only  be a builtin PL.  Instead I would prefer a defined
   interface for PL implemetations.
This commit is contained in:
PostgreSQL Daemon
1998-01-15 19:46:37 +00:00
parent 763ff8aef8
commit baef78d96b
37 changed files with 340 additions and 398 deletions

View File

@@ -21,6 +21,8 @@
#include <utils/rel.h>
#include <storage/off.h>
#include <fmgr.h>
/*
** You can have as many strategies as you please in GiSTs, as
** long as your consistent method can handle them
@@ -71,13 +73,13 @@ typedef struct GISTSTACK
typedef struct GISTSTATE
{
func_ptr consistentFn;
func_ptr unionFn;
func_ptr compressFn;
func_ptr decompressFn;
func_ptr penaltyFn;
func_ptr picksplitFn;
func_ptr equalFn;
FmgrInfo consistentFn;
FmgrInfo unionFn;
FmgrInfo compressFn;
FmgrInfo decompressFn;
FmgrInfo penaltyFn;
FmgrInfo picksplitFn;
FmgrInfo equalFn;
bool haskeytype;
bool keytypbyval;
} GISTSTATE;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: skey.h,v 1.6 1997/09/08 21:51:01 momjian Exp $
* $Id: skey.h,v 1.7 1998/01/15 19:46:18 pgsql Exp $
*
*
* Note:
@@ -17,13 +17,14 @@
#define SKEY_H
#include <access/attnum.h>
#include <fmgr.h>
typedef struct ScanKeyData
{
bits16 sk_flags; /* flags */
AttrNumber sk_attno; /* domain number */
RegProcedure sk_procedure; /* procedure OID */
func_ptr sk_func;
FmgrInfo sk_func;
int32 sk_nargs;
Datum sk_argument; /* data to compare */
} ScanKeyData;

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: valid.h,v 1.11 1997/11/24 05:09:41 momjian Exp $
* $Id: valid.h,v 1.12 1998/01/15 19:46:18 pgsql Exp $
*
*-------------------------------------------------------------------------
*/
@@ -71,13 +71,13 @@ do \
break; \
} \
\
if (__cur_keys->sk_func == (func_ptr) oideq) /* optimization */ \
if (__cur_keys->sk_func.fn_addr == (func_ptr) oideq) /* optimization */ \
__test = (__cur_keys->sk_argument == __atp); \
else if (__cur_keys->sk_flags & SK_COMMUTE) \
__test = (long) FMGR_PTR2(__cur_keys->sk_func, __cur_keys->sk_procedure, \
__test = (long) FMGR_PTR2(&__cur_keys->sk_func, \
__cur_keys->sk_argument, __atp); \
else \
__test = (long) FMGR_PTR2(__cur_keys->sk_func, __cur_keys->sk_procedure, \
__test = (long) FMGR_PTR2(&__cur_keys->sk_func, \
__atp, __cur_keys->sk_argument); \
\
if (!__test == !(__cur_keys->sk_flags & SK_NEGATE)) \