<commit_before>/*
 * $PostgreSQL: pgsql/src/test/regress/regress.c,v 1.72 2009/01/07 13:44:37 tgl Exp $
 */

#include "postgres.h"
#include "funcapi.h"
#include "tablefuncapi.h"

#include <float.h>
#include <math.h>
#include <unistd.h>

#include "pgstat.h"
#include "access/transam.h"
#include "access/xact.h"
#include "catalog/pg_language.h"
#include "catalog/pg_type.h"
#include "cdb/memquota.h"
#include "cdb/cdbgang.h"
#include "cdb/cdbvars.h"
#include "commands/sequence.h"
#include "commands/trigger.h"
#include "executor/executor.h"
#include "executor/spi.h"
#include "port/atomics.h"
#include "parser/parse_expr.h"
#include "libpq/auth.h"
#include "libpq/hba.h"
#include "utils/builtins.h"
#include "utils/geo_decls.h"
#include "utils/lsyscache.h"
#include "utils/resscheduler.h"

#define P_MAXDIG 12
#define LDELIM			'('
#define RDELIM			')'
#define DELIM			','

extern Datum regress_dist_ptpath(PG_FUNCTION_ARGS);
extern Datum regress_path_dist(PG_FUNCTION_ARGS);
extern PATH *poly2path(POLYGON *poly);
extern Datum interpt_pp(PG_FUNCTION_ARGS);
extern void regress_lseg_construct(LSEG *lseg, Point *pt1, Point *pt2);
extern Datum overpaid(PG_FUNCTION_ARGS);
extern Datum boxarea(PG_FUNCTION_ARGS);
extern char *reverse_name(char *string);
extern int	oldstyle_length(int n, text *t);
extern Datum int44in(PG_FUNCTION_ARGS);
extern Datum int44out(PG_FUNCTION_ARGS);
extern Datum gp_str2bytea(PG_FUNCTION_ARGS);
extern Datum check_auth_time_constraints(PG_FUNCTION_ARGS);

/* table_functions test */
extern Datum multiset_example(PG_FUNCTION_ARGS);
extern Datum multiset_scalar_null(PG_FUNCTION_ARGS);
extern Datum multiset_scalar_value(PG_FUNCTION_ARGS);
extern Datum multiset_scalar_tuple(PG_FUNCTION_ARGS);
extern Datum multiset_setof_null(PG_FUNCTION_ARGS);
extern Datum multiset_setof_value(PG_FUNCTION_ARGS);
extern Datum multiset_materialize_good(PG_FUNCTION_ARGS);
extern Datum multiset_materialize_bad(PG_FUNCTION_ARGS);

/* table functions + dynamic type support */
extern Datum sessionize(PG_FUNCTION_ARGS);
extern Datum describe(PG_FUNCTION_ARGS);
extern Datum project(PG_FUNCTION_ARGS);
extern Datum project_describe(PG_FUNCTION_ARGS);

extern Datum userdata_describe(PG_FUNCTION_ARGS);
extern Datum userdata_project(PG_FUNCTION_ARGS);
extern Datum noop_project(PG_FUNCTION_ARGS);

/* resource queue support */
extern Datum checkResourceQueueMemoryLimits(PG_FUNCTION_ARGS);

extern Datum checkRelationAfterInvalidation(PG_FUNCTION_ARGS);

/* Gang management test support */
extern Datum gangRaiseInfo(PG_FUNCTION_ARGS);

/* brutally cleanup all gangs */
extern Datum cleanupAllGangs(PG_FUNCTION_ARGS);

/* check if QD has gangs exist */
extern Datum hasGangsExist(PG_FUNCTION_ARGS);

/*
 * check if backends exist
 * Args:
 * timeout: = 0, retrun result immediately
 * timeout: > 0, block until no backends exist or timeout expired.
 */
extern Datum hasBackendsExist(PG_FUNCTION_ARGS);

/*
 * test_atomic_ops was backported from 9.5. This prototype doesn't appear
 * in the upstream version, because the PG_FUNCTION_INFO_V1() macro includes
 * it since 9.4.
 */
extern Datum test_atomic_ops(PG_FUNCTION_ARGS);<commit_msg>Fix typo in comment<commit_after>/*
 * $PostgreSQL: pgsql/src/test/regress/regress.c,v 1.72 2009/01/07 13:44:37 tgl Exp $
 */

#include "postgres.h"
#include "funcapi.h"
#include "tablefuncapi.h"

#include <float.h>
#include <math.h>
#include <unistd.h>

#include "pgstat.h"
#include "access/transam.h"
#include "access/xact.h"
#include "catalog/pg_language.h"
#include "catalog/pg_type.h"
#include "cdb/memquota.h"
#include "cdb/cdbgang.h"
#include "cdb/cdbvars.h"
#include "commands/sequence.h"
#include "commands/trigger.h"
#include "executor/executor.h"
#include "executor/spi.h"
#include "port/atomics.h"
#include "parser/parse_expr.h"
#include "libpq/auth.h"
#include "libpq/hba.h"
#include "utils/builtins.h"
#include "utils/geo_decls.h"
#include "utils/lsyscache.h"
#include "utils/resscheduler.h"

#define P_MAXDIG 12
#define LDELIM			'('
#define RDELIM			')'
#define DELIM			','

extern Datum regress_dist_ptpath(PG_FUNCTION_ARGS);
extern Datum regress_path_dist(PG_FUNCTION_ARGS);
extern PATH *poly2path(POLYGON *poly);
extern Datum interpt_pp(PG_FUNCTION_ARGS);
extern void regress_lseg_construct(LSEG *lseg, Point *pt1, Point *pt2);
extern Datum overpaid(PG_FUNCTION_ARGS);
extern Datum boxarea(PG_FUNCTION_ARGS);
extern char *reverse_name(char *string);
extern int	oldstyle_length(int n, text *t);
extern Datum int44in(PG_FUNCTION_ARGS);
extern Datum int44out(PG_FUNCTION_ARGS);
extern Datum gp_str2bytea(PG_FUNCTION_ARGS);
extern Datum check_auth_time_constraints(PG_FUNCTION_ARGS);

/* table_functions test */
extern Datum multiset_example(PG_FUNCTION_ARGS);
extern Datum multiset_scalar_null(PG_FUNCTION_ARGS);
extern Datum multiset_scalar_value(PG_FUNCTION_ARGS);
extern Datum multiset_scalar_tuple(PG_FUNCTION_ARGS);
extern Datum multiset_setof_null(PG_FUNCTION_ARGS);
extern Datum multiset_setof_value(PG_FUNCTION_ARGS);
extern Datum multiset_materialize_good(PG_FUNCTION_ARGS);
extern Datum multiset_materialize_bad(PG_FUNCTION_ARGS);

/* table functions + dynamic type support */
extern Datum sessionize(PG_FUNCTION_ARGS);
extern Datum describe(PG_FUNCTION_ARGS);
extern Datum project(PG_FUNCTION_ARGS);
extern Datum project_describe(PG_FUNCTION_ARGS);

extern Datum userdata_describe(PG_FUNCTION_ARGS);
extern Datum userdata_project(PG_FUNCTION_ARGS);
extern Datum noop_project(PG_FUNCTION_ARGS);

/* resource queue support */
extern Datum checkResourceQueueMemoryLimits(PG_FUNCTION_ARGS);

extern Datum checkRelationAfterInvalidation(PG_FUNCTION_ARGS);

/* Gang management test support */
extern Datum gangRaiseInfo(PG_FUNCTION_ARGS);

/* brutally cleanup all gangs */
extern Datum cleanupAllGangs(PG_FUNCTION_ARGS);

/* check if QD has gangs exist */
extern Datum hasGangsExist(PG_FUNCTION_ARGS);

/*
 * check if backends exist
 * Args:
 * timeout: = 0, return result immediately
 * timeout: > 0, block until no backends exist or timeout expired.
 */
extern Datum hasBackendsExist(PG_FUNCTION_ARGS);

/*
 * test_atomic_ops was backported from 9.5. This prototype doesn't appear
 * in the upstream version, because the PG_FUNCTION_INFO_V1() macro includes
 * it since 9.4.
 */
extern Datum test_atomic_ops(PG_FUNCTION_ARGS);
{'fraction_non_alphanumeric': 0.10492845786963434, 'fraction_numerical': 0.010810810810810811, 'mean_word_length': 7.065384615384615, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '6244409', 'n_tokens_mistral': 2342, 'n_tokens_neox': 2183, 'n_words': 500}