gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Re: convenience comm views


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Re: convenience comm views
Date: Sat, 26 Jun 2004 08:03:56 +0200
User-agent: Mutt/1.3.22.1i

> >In it's current form this view will produce (no_of_identities * 
> >no_of_comm_types) rows. Is this really what is intended ?
> The convenience view is not v_linked_comms but v_flat_comms,
True enough (note: v_linked_comms -> v_person_comms,
v_flat_comms -> v_person_comms_flat).

> and it would have to return blank fields anyway
Duh, true. I'd prefer to generate them in v_person_comms_flat
for people that do have some URLs, though, such that we don't
carry a zillion completely empty rows in that view. Eg. if
there's no row in v_person_comms a person does not have that
type of comm channel recorded. Likewise, if there's no row in
v_person_comms_flat we don't know *any* comm channel for that
person.

For the latter to hold true, however, one would need to use
generic crosstab functionality, eg. turning a column's
*values* into column *names* for the view. I have so far
avoided to require any contrib/ stuff. However, crosstab is a
long-standing, established one likely to be included with any
noteworthy PostgreSQL package so that we can probably rely on
it being there.

If you show me the code I'll review and include it.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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