Use these commands to generate a self-signed SSL certificate (e.g. for Apache):
# openssl genrsa 1024 > server.key # openssl req -new -key server.key -x509 -days 90 -out server.crt
apachecertificatescommandskeysopensslsecurityssl
Use the following query to show all tables without primary keys:
SELECT
nspname AS schema,
relname AS table
FROM pg_class
LEFT JOIN pg_constraint ON
pg_constraint.contype = 'p' AND
conrelid = pg_class.oid
JOIN pg_namespace ON
pg_namespace.oid = pg_class.relnamespace
WHERE
relkind = 'r' AND contype IS NULL;
internalskeysmetadatapostgresqlprimarysql