File: pgq_init_ext.sql

package info (click to toggle)
pgq 3.2.6-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 836 kB
  • sloc: sql: 3,412; ansic: 1,990; python: 302; makefile: 89; sh: 2
file content (25 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

-- create noext schema
\set ECHO none
\set VERBOSITY 'terse'
set client_min_messages = 'warning';
\i structure/install.sql
select pgq.create_queue('testqueue1');
\set ECHO all
-- convert to extension
create extension pgq from 'unpackaged';
select array_length(extconfig, 1) from pg_catalog.pg_extension where extname = 'pgq';

select pgq.create_queue('testqueue2');
--drop extension pgq; -- will fail
select pgq.drop_queue('testqueue2');
select pgq.drop_queue('testqueue1');

-- drop schema failure
drop extension pgq;

-- create clean schema
create extension pgq;

select array_length(extconfig, 1) from pg_catalog.pg_extension where extname = 'pgq';