Загрузка данных


admcomulanude_datafiles=# \d+ files
                                                    Таблица "public.files"
 Столбец |  Тип  | Правило сортировки | Допустимость NULL | По умолчанию | Хранилище | Сжатие | Цель для статистики | Описание 
---------+-------+--------------------+-------------------+--------------+-----------+--------+---------------------+----------
 _id     | text  |                    | not null          |              | extended  |        |                     | 
 _name   | text  |                    | not null          |              | extended  |        |                     | 
 _dataf  | bytea |                    | not null          |              | extended  |        |                     | 
Индексы:
    "files_pkey" PRIMARY KEY, btree (_id)
Метод доступа: heap

admcomulanude_datafiles=# select tgname, tgtype, tgenabled, pg_get_triggerdef(oid) from pg_trigger where tgrelid = 'files'::regclass and not tgisinternal;
 tgname | tgtype | tgenabled | pg_get_triggerdef 
--------+--------+-----------+-------------------
(0 строк)

admcomulanude_datafiles=# select relname, relkind, relpersistence from pg_class where oid = 'files';;regclass;
ОШИБКА:  неверный синтаксис для типа oid: "files"
СТРОКА 1: ..., relkind, relpersistence from pg_class where oid = 'files';
                                                                 ^
ОШИБКА:  ошибка синтаксиса (примерное положение: "regclass")
СТРОКА 1: regclass;
          ^
admcomulanude_datafiles=# select relname, relkind, relpersistence from pg_class where oid = 'files'::regclass;
 relname | relkind | relpersistence 
---------+---------+----------------
 files   | r       | p
(1 строка)

admcomulanude_datafiles=# select relrowsecurity, relforcerowsecurity from pg_class where oid = 'files'::regclass;
 relrowsecurity | relforcerowsecurity 
----------------+---------------------
 f              | f
(1 строка)

admcomulanude_datafiles=# select * from pg_policies where tablename = 'files';
 schemaname | tablename | policyname | permissive | roles | cmd | qual | with_check 
------------+-----------+------------+------------+-------+-----+------+------------
(0 строк)

admcomulanude_datafiles=#