Re: query has no destination for result data - Mailing list pgsql-general

From Rob Sargent
Subject Re: query has no destination for result data
Date
Msg-id 14E03299-EEAD-45F0-A2B6-BF12F7218962@gmail.com
Whole thread Raw
In response to Re: query has no destination for result data  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: query has no destination for result data
List pgsql-general


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;


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: query has no destination for result data
Next
From: Erwin Brandstetter
Date:
Subject: EXCLUDE USING hash(i WITH =)