/*
- * $PostgreSQL: pgsql/src/test/regress/regress.c,v 1.70 2007/03/15 23:12:07 tgl Exp $
+ * $PostgreSQL: pgsql/src/test/regress/regress.c,v 1.72 2009/01/07 13:44:37 tgl Exp $
*/
#include "postgres.h"
-#include <float.h> /* faked on sunos */
+#include <float.h>
+#include <math.h>
#include "access/transam.h"
-#include "utils/geo_decls.h" /* includes <math.h> */
-#include "executor/executor.h" /* For GetAttributeByName */
-#include "commands/sequence.h" /* for nextval() */
+#include "access/xact.h"
+#include "catalog/pg_type.h"
+#include "commands/sequence.h"
+#include "commands/trigger.h"
+#include "executor/executor.h"
+#include "executor/spi.h"
+#include "utils/builtins.h"
+#include "utils/geo_decls.h"
+
#define P_MAXDIG 12
#define LDELIM '('
return n + len;
}
-#include "executor/spi.h" /* this is what you need to work with SPI */
-#include "commands/trigger.h" /* -"- and triggers */
static TransactionId fd17b_xid = InvalidTransactionId;
static TransactionId fd17a_xid = InvalidTransactionId;
return PointerGetDatum(NULL);
}
- {
- text *seqname = DatumGetTextP(DirectFunctionCall1(textin,
- CStringGetDatum("ttdummy_seq")));
-
- newoff = DirectFunctionCall1(nextval,
- PointerGetDatum(seqname));
- /* nextval now returns int64; coerce down to int32 */
- newoff = Int32GetDatum((int32) DatumGetInt64(newoff));
- pfree(seqname);
- }
+ newoff = DirectFunctionCall1(nextval, CStringGetTextDatum("ttdummy_seq"));
+ /* nextval now returns int64; coerce down to int32 */
+ newoff = Int32GetDatum((int32) DatumGetInt64(newoff));
/* Connect to SPI manager */
if ((ret = SPI_connect()) < 0)