gnumed-bugs
[Top][All Lists]
Advanced

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

Re: [Gnumed-bugs] Problem with rc7 bootstrap


From: Karsten Hilbert
Subject: Re: [Gnumed-bugs] Problem with rc7 bootstrap
Date: Sat, 22 Oct 2011 22:43:56 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Oct 22, 2011 at 01:20:23PM -0700, Jim Busser wrote:

> Could the function stumble if the output of
> 
>       select gm.concat_table_structure(); 
> 
> does not group the table / column descriptions

They are quite ordered, indeed, namely by the hex
representation of the per-line md5 sum:

        for _row in
                select * from information_schema.columns cols
                        where cols.table_name in (
                                select tabs.table_name from 
information_schema.tables tabs where
                                        -- those which hold clinical data
                                        tabs.table_schema in (''dem'', 
''clin'', ''blobs'', ''cfg'', ''ref'', ''i18n'') and
                                        tabs.table_type = ''BASE TABLE''
                                )
                        order by
                                decode(md5(cols.table_schema || cols.table_name 
|| cols.column_name || cols.data_type), ''hex'')
        loop
                _total := _total
                        || _row.table_schema || ''.''
                        || _row.table_name || ''.''
                        || _row.column_name || ''::''
                        || _row.udt_name || E''\n'';
        end loop;

Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

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