Re: \i and \watch - Mailing list pgsql-admin

From Tom Lane
Subject Re: \i and \watch
Date
Msg-id 3414975.1730986982@sss.pgh.pa.us
Whole thread Raw
In response to Re: \i and \watch  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-admin
"David G. Johnston" <david.g.johnston@gmail.com> 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



pgsql-admin by date:

Previous
From: Wasim Devale
Date:
Subject: ON CONFLICT Clause used on partition tables
Next
From: Norbert Poellmann
Date:
Subject: GRANT and predefined role