is date_part immutable or not?

Поиск
Список
Период
Сортировка
От Олег Самойлов
Тема is date_part immutable or not?
Дата
Msg-id 23C20954-7FEF-4132-9BF3-1F8FBD8E1F07@ya.ru
обсуждение исходный текст
Ответы Re: is date_part immutable or not?
Re: is date_part immutable or not?
Список pgsql-general
PostgreSQL 12.4
Just create partitioned table for PostgreSQL logs

CREATE TABLE pglog.pglog (
   log_time timestamp(3) with time zone,
   user_name text,
   database_name text,
   process_id integer,
   connection_from text,
   session_id text,
   session_line_num bigint,
   command_tag text,
   session_start_time timestamp with time zone,
   virtual_transaction_id text,
   transaction_id bigint,
   error_severity text,
   sql_state_code text,
   message text,
   detail text,
   hint text,
   internal_query text,
   internal_query_pos integer,
   context text,
   query text,
   query_pos integer,
   location text,
   application_name text
) PARTITION BY LIST (date_part('isodow', log_time));

ERROR:  functions in partition key expression must be marked IMMUTABLE

But, date_part is immutable

Schema              | pg_catalog
Name                | date_part
Result data type    | double precision
Argument data types | text, time with time zone
Type                | func
Volatility          | immutable
Parallel            | safe
Owner               | postgres
Security            | invoker
Access privileges   |
Language            | internal
Source code         | timetz_part
Description         | extract field from time with time zone

What is wrong here?



В списке pgsql-general по дате отправления:

Предыдущее
От: Paul Förster
Дата:
Сообщение: Re: > ERROR: syntax error at or near "BYTE"
Следующее
От: Thomas Boussekey
Дата:
Сообщение: When are largobject records TOASTed into pg_toast_2613?