Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
blob: b787457e3f9f8c806c951e6d26cd2b9169606f29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * utils.c --
 *
 * This file defines various Postgres utility functions.
 *
 * Copyright (c) 1996, Massimo Dal Zotto <dz@cs.unitn.it>
 */

#include <unistd.h>

#include "postgres.h"
#include "utils/palloc.h"

#include "misc_utils.h"

extern int	ExecutorLimit(int limit);
extern void Async_Unlisten(char *relname, int pid);

int
query_limit(int limit)
{
	return ExecutorLimit(limit);
}

int
backend_pid()
{
	return getpid();
}

int
unlisten(char *relname)
{
	Async_Unlisten(relname, getpid());
	return 0;
}

int
max(int x, int y)
{
	return ((x > y) ? x : y);
}

int
min(int x, int y)
{
	return ((x < y) ? x : y);
}

/* end of file */