Re: Bootstrapping fails trying determine data type on Postgresql 14
Karsten Hilbert <[email protected]> Fri, 6 Jan 2023 15:46:21 +0100
| Newsgroups | gmane.comp.gnu.medical.devel |
|---|---|
| Message-ID | <[email protected]> |
Am Tue, Jan 03, 2023 at 05:48:43PM +0100 schrieb Lennart Reuther: > I'm trying to test-run GnuMed on a local Ubuntu 22.04.1 LTS using the > packages provided by the distribution. > > On executing `gm-bootstrap_server` as described at > https://www.gnumed.de/documentation/GNUmedDatabaseInstallation.html, > the script aborts with the issue Karsten already described at > https://www.spinics.net/lists/pgsql/msg211132.html > > During some research I found, that the same lines still exist on `master` Nicely researched. I'll backport the fix to v1.8/v22 such that people can use that to bootstrap a fresh database. > I tried fixing it with the `pg_typeof` approach without testing, > succeeded the script but guess it isn't working [...] If the bootstrapper eventually tells you that it seems to have succeeded it should be fine. What exactly did you observe when you say: > [...] as any change in the > options using gnumed-client does not affect anything. > 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. > Trying an install using postgres13 on a fresh debian 10 failed with a > different error Please do report. > That was a long foreplay for the question ... is there a workaround for > this issue or what would be a good approach to solve the issue I'll backport the fix. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B