public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: David G. Johnston <[email protected]>
Cc: Edwin UY <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: \i and \watch
Date: Thu, 07 Nov 2024 08:43:02 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwZvMkCNffV8_X2yeVFJdOaFKwVUEuWcLpsvP-w+YjwBGw@mail.gmail.com>
References: <CA+wokJ-NAMMVdo52WdwmGN8CasaE026jhRH7yb1MFU2eF=HeEw@mail.gmail.com>
	<CAKFQuwZvMkCNffV8_X2yeVFJdOaFKwVUEuWcLpsvP-w+YjwBGw@mail.gmail.com>

"David G. Johnston" <[email protected]> writes:
> Watch is documented to act on either a non-empty query buffer or the last
> sent command.  I would expect that whatever the final SQL command present
> in x.sql is would be the command that gets watched.  If indeed the
> preceding select 1 command is watched there would seem to be an
> undocumented interaction going on.

It looks like there's a separate query_buf for each recursive level
of MainLoop(), that is, each level of \i.  So maybe the docs need
improvement here.  (I think the actual behavior is probably fine.)

			regards, tom lane






view thread (4+ messages)

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: \i and \watch
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox