From: Rob Sargent <robjsargent@gmail.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: query has no destination for result data
Date: Wed, 6 Mar 2019 08:19:59 -0800
Message-ID: <14E03299-EEAD-45F0-A2B6-BF12F7218962@gmail.com> (raw)
In-Reply-To: <e33623e2-6fad-7c18-f7b9-0a1cf6a784e9@aklaver.com>
References: <A8036BFA-C490-4E2E-819D-BD655CDAC364@gmail.com>
<56fdbfbb-c0ed-3aa0-3815-eef3545e5419@gmail.com>
<FE45B577-73A8-4AD4-A31E-F57862D5CD2A@gmail.com>
<e75c3c9b-20fa-0b4d-a9ed-3b398082787c@aklaver.com>
<CAFj8pRBY5DOfE1O_+ZbK4B6TP7VxccQy73kF_+u-1dCo+VhcyQ@mail.gmail.com>
<e33623e2-6fad-7c18-f7b9-0a1cf6a784e9@aklaver.com>
> On Mar 6, 2019, at 7:41 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>
> On 3/6/19 7:37 AM, Pavel Stehule wrote:
>
>> or
>> \sf+ functioname
>
> Cool, I learned something new.
>
>> Regards
>> Pavel
>
>
using \ef function 65 puts the cursor on the first line of the loop. So a debugging statement got in the way! I don’t need the variables set other than to keep track of what’s going on in the loop. They’re gone now and so it the problem (and hopefully I’ll correct my ways).
Thank you all.
raise notice '%: added % segments to imputed_pvalue_t', clock_timestamp(), rcount;
--
for segp in
select s.id, s.firstmarker, s.lastmarker,
v.ipv,
array_length(p.probands,1) as pbs,
s.lastmarker - s.firstmarker as mks
from segment s
join imputed_pvalue_t v on s.id = v.segment_id
join probandset p on s.probandset_id = p.id
join probandset_group_member m on p.id = m.member_id
where s.markerset_id = mkset
and m.group_id = pbsgid
order by ipv, pbs, mks
LOOP
select imkr=min(ordinal), jmkr=max(ordinal) from mrkidx where ordinal between segp.firstmarker and segp.lastmarker;
raise notice 'seg % start=% i=% end=% j=%', segp.id, segp.firstmarker, imkr, segp.lastmarker, jmkr;
delete from mrkidx where ordinal between segp.firstmarker and segp.lastmarker;
get diagnostics rcount = ROW_COUNT;
segsdone = segsdone + 1;
if rcount > 0 then
insert into collected values(segp.id, segp.ipv);
totalinserts = totalinserts + rcount;
if totalinserts = mkrcnt then -- really totalDELETES
raise notice '%: no markers left on %th segment %', clock_timestamp(), segsdone, segp.id;
exit;
end if;
end if;
end loop;
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: robjsargent@gmail.com, adrian.klaver@aklaver.com
Subject: Re: query has no destination for result data
In-Reply-To: <14E03299-EEAD-45F0-A2B6-BF12F7218962@gmail.com>
References: <A8036BFA-C490-4E2E-819D-BD655CDAC364@gmail.com> <56fdbfbb-c0ed-3aa0-3815-eef3545e5419@gmail.com> <FE45B577-73A8-4AD4-A31E-F57862D5CD2A@gmail.com> <e75c3c9b-20fa-0b4d-a9ed-3b398082787c@aklaver.com> <CAFj8pRBY5DOfE1O_+ZbK4B6TP7VxccQy73kF_+u-1dCo+VhcyQ@mail.gmail.com> <e33623e2-6fad-7c18-f7b9-0a1cf6a784e9@aklaver.com> <14E03299-EEAD-45F0-A2B6-BF12F7218962@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox