pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Huang Wang <hwang@rhrk.uni-kl.de>
To: pgsql-general@postgresql.org
Cc: h_wang21@informatik.uni-kl.de
Subject: Error when rewriting a query into multiple queries
Date: Sat, 20 Nov 2021 00:04:15 +0100
Message-ID: <ximss-229849332@mail1.uni-kl.de> (raw)

Dear Sir or Madam,

I'm trying to add progressive query into Postgres. Assume a query 'SELECT * 
FROM hugetable', my idea is to rewrite it into several queries as
    'SELECT * FROM hugetable TABLESAMPLE SYSTEM_TIME(500)'
    'SELECT * FROM hugetable TABLESAMPLE SYSTEM_TIME(1000)'
    'SELECT * FROM hugetable TABLESAMPLE SYSTEM_TIME(1500)'
the first query will provide real-time results to the user and the following 
queries will return later for more accurate results. However, I got a 
'[42601]: ERROR: cannot insert multiple commands into a prepared statement' 
error after I modified postgres.c or parser.c. Is there any way to do it on 
the server or it's better to do it in the application? Thank you for your 
help.

Best regards,
Wang







view thread (2+ messages)  latest in thread

Message-ID: <ximss-229849332@mail1.uni-kl.de>
Permalink:  ../ximss-229849332@mail1.uni-kl.de/
Also on:    postgresql.org/message-id/ximss-229849332@mail1.uni-kl.de

 · 

reply

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: hwang@rhrk.uni-kl.de, h_wang21@informatik.uni-kl.de
  Subject: Re: Error when rewriting a query into multiple queries
  In-Reply-To: <ximss-229849332@mail1.uni-kl.de>
  References: <ximss-229849332@mail1.uni-kl.de>

* 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