You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
left(_text ||'_'|| i::text, 100)::varchar(100) as varchar_val,
64
+
lpad(i::text, 10, '0')::char(10) as char_val,
65
+
-- integer types
66
+
(i % 32767)::smallintas smallint_val,
67
+
_int + i as int_val,
68
+
_bigint + i as bigint_val,
69
+
-- floating point
70
+
(_numeric + i +0.1234)::numeric(12,4) as numeric_val,
71
+
(_real + i *0.1)::realas real_val,
72
+
(_double + i *0.001)::double precisionas double_val,
73
+
-- boolean
74
+
case when i % 2=0 then _bool else not _bool end as bool_val,
75
+
-- date/time
76
+
_date + i as date_val,
77
+
('12:00:00'::time+ (i ||' minutes')::interval)::timeas time_val,
78
+
_timestamp + (i ||' hours')::interval as timestamp_val,
79
+
_timestamptz + (i ||' hours')::interval as timestamptz_val,
80
+
(i ||' days')::interval as interval_val,
81
+
-- special types
82
+
case when i =1 then _uuid
83
+
else uuid_generate_v5(_uuid, i::text) end as uuid_val,
84
+
(_json::jsonb || jsonb_build_object('i', i))::json as json_val,
85
+
_jsonb || jsonb_build_object('row', i) as jsonb_val,
86
+
-- arrays
87
+
_int_array || array[i] as int_array_val,
88
+
_text_array || array[_text || i::text] as text_array_val,
89
+
-- nullable (nulls on even rows)
90
+
case when i % 2=1 then _text ||'_'|| i::text else null end as nullable_text,
91
+
case when i % 2=1 then i else null end as nullable_int
35
92
from
36
93
generate_series(1, _records) as i
37
94
$$;
38
95
39
-
comment on function public.test_func_v1(int,text,int, timestamp, bool) is 'HTTP GET /api/test-data';
96
+
comment on function public.perf_test(int,text,int,bigint,numeric,real,double precision,bool,date,timestamp,timestamptz,uuid,json,jsonb,int[],text[]) is 'HTTP GET /api/perf-test';
0 commit comments