<commit_before>/*-------------------------------------------------------------------------
 *
 * pg_log_userqueries.c
 *		Log statement according to the user.
 *
 *
 * Copyright (c) 2011, <NAME> (Dalibo),
 * <EMAIL>
 * 
 *-------------------------------------------------------------------------
 */
#include "postgres.h"

#include <unistd.h>
#include <regex.h>
#include <syslog.h>

#include "funcapi.h"
#include "miscadmin.h"
#include "tcop/utility.h"
#include "libpq/libpq-be.h"

PG_MODULE_MAGIC;

#ifndef PG_SYSLOG_LIMIT
#define PG_SYSLOG_LIMIT 1024
#endif

/*---- Local variables ----*/
static const struct config_enum_entry server_message_level_options[] = {
	{"debug", DEBUG2, true},
	{"debug5", DEBUG5, false},
	{"debug4", DEBUG4, false},
	{"debug3", DEBUG3, false},
	{"debug2", DEBUG2, false},
	{"debug1", DEBUG1, false},<commit_msg>Disable the include of PostgreSQL regexps header<commit_after>/*-------------------------------------------------------------------------
 *
 * pg_log_userqueries.c
 *		Log statement according to the user.
 *
 *
 * Copyright (c) 2011, <NAME> (Dalibo),
 * <EMAIL>
 * 
 *-------------------------------------------------------------------------
 */
#include "postgres.h"

#include <unistd.h>
#include <regex.h>
#include <syslog.h>

/*
 * We won't use PostgreSQL regexps,
 * and as they redefine some system regexps types, we make sure we don't
 * redefine them
 */
#define _REGEX_H_

#include "funcapi.h"
#include "tcop/utility.h"
#include "libpq/libpq-be.h" /* For Port▸▸   ▸   ▸   ▸   ▸   */
#include "miscadmin.h"      /* For MyProcPort▸  ▸   ▸   ▸   */

PG_MODULE_MAGIC;

#ifndef PG_SYSLOG_LIMIT
#define PG_SYSLOG_LIMIT 1024
#endif

/*---- Local variables ----*/
static const struct config_enum_entry server_message_level_options[] = {
	{"debug", DEBUG2, true},
	{"debug5", DEBUG5, false},
	{"debug4", DEBUG4, false},
	{"debug3", DEBUG3, false},
	{"debug2", DEBUG2, false},
	{"debug1", DEBUG1, false},
{'fraction_non_alphanumeric': 0.294238683127572, 'fraction_numerical': 0.01954732510288066, 'mean_word_length': 2.1370967741935485, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3669157', 'n_tokens_mistral': 666, 'n_tokens_neox': 651, 'n_words': 162}