gnumed-devel
[Top][All Lists]
Advanced

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

Bootstrapping fails trying determine data type on Postgresql 14


From: Lennart Reuther
Subject: Bootstrapping fails trying determine data type on Postgresql 14
Date: Tue, 03 Jan 2023 17:48:43 +0100

Hi Gnumed-Team,

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`
(https://github.com/ncqgm/gnumed/blob/master/gnumed/gnumed/server/sql/v2-v3/dynamic/cfg-set_option.sql),
but a fix is forecasted for a future 1.9 - release
(https://github.com/ncqgm/gnumed/blob/master/gnumed/CHANGELOG).

I tried fixing it with the `pg_typeof` approach without testing,
succeeded the script but guess it isn't working 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;
``` 
but as said, wasn't able to test if it actually does the right thing.

Trying an install using postgres13 on a fresh debian 10 failed with a
different error, so I didn't go further on that path

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 ... more
and more user will use a postgres 14+ in the future I guess. 

Thanks for your help already, appreciating all the work and effort you
guys put into it ... I'd like to see it fly. 

Cheers, Lennart



reply via email to

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