Versión
SELECT version();
Activar extensiones
CREATE EXTENSION IF NOT EXISTS vector;
Funciones
gen_random_uuid()
Listar las tablas denro de un schema dado
SELECT table_name, table_type
FROM information_schema.tables
WHERE table_schema = 'your_schema'
ORDER BY table_name;
Listar detalles de columnas de la base de datos actual
SELECT
table_schema,
table_name,
column_name,
data_type,
is_nullable,
column_default,
character_maximum_length,
numeric_precision,
datetime_precision
FROM
information_schema.columns
WHERE
table_schema NOT IN ('information_schema','pg_catalog')
ORDER BY table_schema, table_name, ordinal_position
Comentarios
Publicar un comentario