Sha256: 08b307faabb44252018e8a2c5754550a70addb6cca2dc0641fa18ff1d6afc6cc

Contents?: true

Size: 1.22 KB

Versions: 12

Compression:

Stored size: 1.22 KB

Contents

/*-------------------------------------------------------------------------
 *
 * value.c
 *	  implementation of Value nodes
 *
 *
 * Portions Copyright (c) 2003-2013, PgPool Global Development Group
 * Copyright (c) 2003-2012, PostgreSQL Global Development Group
 *
 *
 * IDENTIFICATION
 *	  src/backend/nodes/value.c
 *
 *-------------------------------------------------------------------------
 */
/*#include "postgres.h"*/

#include <stdlib.h>
#include "pool_memory.h"
#include "parsenodes.h"

/*
 *	makeInteger
 */
Value *
makeInteger(long i)
{
	Value	   *v = makeNode(Value);

	v->type = T_Integer;
	v->val.ival = i;
	return v;
}

/*
 *	makeFloat
 *
 * Caller is responsible for passing a palloc'd string.
 */
Value *
makeFloat(char *numericStr)
{
	Value	   *v = makeNode(Value);

	v->type = T_Float;
	v->val.str = numericStr;
	return v;
}

/*
 *	makeString
 *
 * Caller is responsible for passing a palloc'd string.
 */
Value *
makeString(char *str)
{
	Value	   *v = makeNode(Value);

	v->type = T_String;
	v->val.str = str;
	return v;
}

/*
 *	makeBitString
 *
 * Caller is responsible for passing a palloc'd string.
 */
Value *
makeBitString(char *str)
{
	Value	   *v = makeNode(Value);

	v->type = T_BitString;
	v->val.str = str;
	return v;
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
prestogres-0.4.8 pgpool2/parser/value.c
prestogres-0.4.7 pgpool2/parser/value.c
prestogres-0.4.6 pgpool2/parser/value.c
prestogres-0.4.5 pgpool2/parser/value.c
prestogres-0.4.4 pgpool2/parser/value.c
prestogres-0.4.3 pgpool2/parser/value.c
prestogres-0.4.2 pgpool2/parser/value.c
prestogres-0.4.1 pgpool2/parser/value.c
prestogres-0.4.0 pgpool2/parser/value.c
prestogres-0.3.0 pgpool2/parser/value.c
prestogres-0.2.0 pgpool2/parser/value.c
prestogres-0.1.0 pgpool2/parser/value.c