/etc/postgresql//main
# Primary location for global instance settings
# - Memory -
shared_buffers = 128MB
# huge_pages = try
# temp_buffers = 8MB
# max_prepared_transactions = 0
Contains client authentication settings
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
SELECT <field(s)> FROM <table>
SELECT * FROM devices;
SELECT hostname,ip_address FROM devices;
SELECT first_name || ' ' || last_name AS full_name,email FROM customer;
SELECT * FROM devices ORDER BY hostname DESC;
SELECT * FROM devices ORDER BY LENGTH(hostname);
SELECT * FROM devices WHERE LENGTH(hostname) BETWEEN 3 AND 5;
SELECT * FROM devices WHERE vendor = 'Cisco';
SELECT * FROM devices WHERE vendor != 'Cisco';
SELECT * FROM devices WHERE vendor = 'Cisco' AND function = 'router';
SELECT * FROM devices WHERE hostname LIKE 'R%';
SELECT * FROM devices WHERE hostname LIKE 'R_';
SELECT * FROM devices WHERE vendor IN ('Cisco', 'Juniper');
SELECT * FROM devices WHERE created_on BETWEEN '2020-01-01' AND '2020-05-01';
SELECT hostname, management_ip, vendor, credentials.user, credentials.password FROM devices inner join credentials on devices.credentials = credentials.user;
ALTER TABLE public.credentials ADD CONSTRAINT credentials_un UNIQUE ("user");
CREATE TYPE net_vendor AS ENUM ('cisco', 'juniper', 'fortinet', 'checkpoint');
CREATE TABLE hardware (
model text,
vendor net_vendor,
dev_type text
);
CREATE TABLE public.acls (
id uuid NOT NULL DEFAULT uuid_generate_v1()
);