Prevent duplicate call to stored procs

Reuse a CTE for results of call
This commit is contained in:
Joe Nelson
2016-03-12 18:28:36 -08:00
parent 358254639a
commit 4cc08a11e7
5 changed files with 31 additions and 7 deletions
+12
View File
@@ -261,6 +261,18 @@ CREATE FUNCTION sayhello(name text) RETURNS text
$_$;
--
-- Name: callcounter(); Type: FUNCTION; Schema: test; Owner: -
--
CREATE SEQUENCE callcounter_count START 1;
CREATE FUNCTION callcounter() RETURNS bigint
LANGUAGE sql
AS $_$
SELECT nextval('test.callcounter_count');
$_$;
--
-- Name: test_empty_rowset(); Type: FUNCTION; Schema: test; Owner: -
--