• R/O
  • HTTP
  • SSH
  • HTTPS

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

firtst release


File Info

Rev. ae19f43d09e8bd15267ba57510440da7874c1575
大小 1,378 字节
时间 2016-04-22 13:38:42
作者 MasaoFujii
Log Message

Use pg_reload_conf() to reload the configuration file in regression test.

Previously the regression test ran pg_ctl reload command for that purpose.
However in the environment where the path to PostgreSQL binaries is not set,
the regression test always failed because pg_ctl could not be found.
To reload the configuration file even in that environment, this commit
changes the regression test so that it uses pg_reload_conf function, instead.

Content

/*-------------------------------------------------------------------------
 *
 * normalize_query.h
 *		Normalize query string.
 *
 * This header file is created from pg_stat_statements.c to implement
 * normalization of query string.
 *
 * Portions Copyright (c) 2008-2014, PostgreSQL Global Development Group
 */
#ifndef NORMALIZE_QUERY_H
#define NORMALIZE_QUERY_H

/*
 * Struct for tracking locations/lengths of constants during normalization
 */
typedef struct pgssLocationLen
{
	int			location;		/* start offset in query text */
	int			length;			/* length in bytes, or -1 to ignore */
} pgssLocationLen;

/*
 * Working state for computing a query jumble and producing a normalized
 * query string
 */
typedef struct pgssJumbleState
{
	/* Jumble of current query tree */
	unsigned char *jumble;

	/* Number of bytes used in jumble[] */
	Size		jumble_len;

	/* Array of locations of constants that should be removed */
	pgssLocationLen *clocations;

	/* Allocated length of clocations array */
	int			clocations_buf_size;

	/* Current number of valid entries in clocations array */
	int			clocations_count;
} pgssJumbleState;

static char *
generate_normalized_query(pgssJumbleState *jstate, const char *query,
						  int *query_len_p, int encoding);
static void JumbleQuery(pgssJumbleState *jstate, Query *query);

#define JUMBLE_SIZE		1024

#endif	/* NORMALIZE_QUERY_H */