This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name Version Rev Tracking Publisher Notes | |
appimage2deb 1.0.0 1 latest/stable readableauthor - | |
bare 1.0 5 latest/stable canonical** base | |
brave 1.74.48 468 latest/stable brave** - | |
clion 2024.3.2 314 latest/stable jetbrains** classic | |
core 16-2.61.4-20240607 17200 latest/stable canonical** core | |
core20 20240911 2434 latest/stable canonical** base | |
core22 20241119 1722 latest/stable canonical** base | |
core24 20241119 716 latest/stable canonical** base | |
cups 2.4.11-2 1067 latest/stable openprinting** - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function get_host_enum(hostname text) | |
returns host_enum as | |
$$ | |
declare | |
_value host_enum; | |
begin | |
select hosts1.key from hosts1 where hosts1.hostname = $1 into _value; | |
if not found then | |
insert into hosts1(hostname) values ($1) on conflict do nothing; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Permissive SecurityManager | |
* | |
* This SecurityManager can still be highly restricive but it allows | |
* access to a sensitive service. | |
*/ | |
public class PermissiveSecurityManager extends SecurityManager { | |
private final List<String> hosts = new ArrayList<>(); | |
public PermissiveSecurityManager(String... hosts) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- --------------------------------------- | |
-- Preparation | |
-- --------------------------------------- | |
CREATE SCHEMA pgcrypto; | |
CREATE EXTENSION pgcrypto WITH SCHEMA pgcrypto; | |
CREATE USER key_manager; | |
CREATE SCHEMA key_manager; | |
ALTER SCHEMA key_manager OWNER TO key_manager; | |
ALTER ROLE key_manager SET search_path TO key_manager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Create user-defined record type for symmetric keys | |
-- | |
CREATE TYPE skey AS ( | |
key_id int4, | |
key bytea, | |
type text | |
); | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Function that needs to explicitly check whether the 'color' value is valid | |
-- | |
CREATE OR REPLACE FUNCTION get_gluon(color text) RETURNS TEXT AS $$ | |
#print_strict_params on | |
DECLARE | |
duck TEXT; | |
BEGIN | |
IF color not in ('red', 'green', 'blue') THEN | |
RAISE EXCEPTION 'unknown color %', color; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE color ( | |
color TEXT CHECK (color IN ('RED', 'GREEN', 'BLUE')) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Create user-defined enum type. | |
-- (List details with '\dT+ color' in psql) | |
-- | |
CREATE TYPE color AS ENUM ('RED', 'GREEN', 'BLUE'); | |
-- | |
-- Create a table using the user-defined enum type. | |
-- | |
CREATE TABLE quark ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION get_gluon(color color) RETURNS TEXT AS $$ | |
#print_strict_params on | |
DECLARE | |
duck TEXT; | |
BEGIN | |
CASE color | |
WHEN 'RED'::color THEN | |
duck := 'Huey'; | |
WHEN 'GREEN'::color THEN | |
duck := 'Dewey'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Define custom enum type containing supported encoding algorithms | |
-- | |
CREATE TYPE encoding AS ENUM ('BASE64', 'ESCAPE', 'HEX'); | |
-- | |
-- Type-safe alternative to encode(bytea, text) | |
-- | |
CREATE OR REPLACE FUNCTION encode (value bytea, alg encoding) RETURNS text AS $$ | |
#print_strict_params on |
NewerOlder