PostgreSQL Source Code: src/backend/access/tablesample/tablesample.c Source File (original) (raw)

Go to the documentation of this file.

1/*-------------------------------------------------------------------------

2 *

3 * tablesample.c

4 * Support functions for TABLESAMPLE feature

5 *

6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group

7 * Portions Copyright (c) 1994, Regents of the University of California

8 *

9 *

10 * IDENTIFICATION

11 * src/backend/access/tablesample/tablesample.c

12 *

13 * -------------------------------------------------------------------------

14 */

15

17

19

20

21/*

22 * GetTsmRoutine --- get a TsmRoutine struct by invoking the handler.

23 *

24 * This is a convenience routine that's just meant to check for errors.

25 */

28{

31

34

36 elog(ERROR, "tablesample handler function %u did not return a TsmRoutine struct",

37 tsmhandler);

38

39 return routine;

40}

#define OidFunctionCall1(functionId, arg1)

#define IsA(nodeptr, _type_)

static Datum PointerGetDatum(const void *X)

static Pointer DatumGetPointer(Datum X)

TsmRoutine * GetTsmRoutine(Oid tsmhandler)