aboutsummaryrefslogtreecommitdiff
path: root/src/test/regress/regress.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/regress/regress.c')
-rw-r--r--src/test/regress/regress.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c
index 97f2ea713f4..b0421332f8b 100644
--- a/src/test/regress/regress.c
+++ b/src/test/regress/regress.c
@@ -1,5 +1,5 @@
/*
- * $PostgreSQL: pgsql/src/test/regress/regress.c,v 1.62 2004/10/21 19:28:36 tgl Exp $
+ * $PostgreSQL: pgsql/src/test/regress/regress.c,v 1.63 2005/07/23 14:18:56 tgl Exp $
*/
#include "postgres.h"
@@ -26,6 +26,8 @@ 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 do_sleep(PG_FUNCTION_ARGS);
+
/*
* Distance from a point to a path
@@ -733,3 +735,18 @@ int44out(PG_FUNCTION_ARGS)
*--walk = '\0';
PG_RETURN_CSTRING(result);
}
+
+/*
+ * do_sleep - delay for N seconds
+ */
+PG_FUNCTION_INFO_V1(do_sleep);
+
+Datum
+do_sleep(PG_FUNCTION_ARGS)
+{
+ int32 secs = PG_GETARG_INT32(0);
+
+ pg_usleep(secs * 1000000L);
+
+ PG_RETURN_VOID();
+}