gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bootstrapping fails trying determine data type on Postgresql 14


From: Karsten Hilbert
Subject: Re: Bootstrapping fails trying determine data type on Postgresql 14
Date: Fri, 6 Jan 2023 16:11:48 +0100

Am Fri, Jan 06, 2023 at 03:46:21PM +0100 schrieb Karsten Hilbert:

> > The approach was
> >
> >       if pg_typeof(_value) in (text, char, varchar, name) then
> >                 val_type := ''string'';
> >         elsif pg_typeof(_value) in (smallint, integer, bigint, numeric,
> > boolean) then
> >                 val_type := ''numeric'';
> >         elsif pg_typeof(_value)::text = ''bytea'' then
> >                 val_type := ''data'';
> >         elsif pg_typeof(_value)::text = ''text[]'' then
> >                 val_type := ''str_array'';
> >         else
> >                 raise exception ''cfg.set_option(text, any, text, text,
> > text): invalid type of value'';
> >         end if;
>
> Sounds fine to me.

Actually, that's _almost_ correct. However, if the
bootstrapper succeeds, it should be fine anyway.

The related change in v1.9 is entirely different: it switches
from complicated type-based tables to using JSON to store the
values which much simplifies things.

I have backported the proper pg_typeof fix, a
bootstrap-latest is test running ATM. It will be
released with v1.8.9.

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



reply via email to

[Prev in Thread] Current Thread [Next in Thread]