0
На рассмотрении

DDL Import | Import SQL failing on gen_random_uuid() and timezone('utc'::text, now())

Bryan Lam 9 месяцев назад обновлен Jarosław Błąd (CEO) 9 месяцев назад 1

The import SQL parser seems to not like `gen_random_uuid()`(supported in Postgres 13) when that is set as the default. It is also failing to parse`timezone('utc'::text, now())`(supported in Postgres 13).

I've been resorting to deleting these from my sql file just so I can get the table to import.

Example:

CREATE TABLE public.skill (
    title character varying NOT NULL,
    description text,
    id uuid DEFAULT gen_random_uuid() NOT NULL,
    created_at timestamp without time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    updated_at timestamp without time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    deleted_at timestamp without time zone
);

To get it to import I have to delete those:

CREATE TABLE public.skill (
    title character varying NOT NULL,
    description text,
    id uuid NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    deleted_at timestamp without time zone
);

Would be nice to have the import accommodate these functions so I don't have to keep editing my sql files before import.

На рассмотрении

Thank you for reporting the issue. We will investigate this.

Best regards,

Jarosław

Сервис поддержки клиентов работает на платформе UserEcho