Re: [HACKERS] psql & query string length

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] psql & query string length
Date: 1999-07-20 14:27:26
Message-ID: 29494.932480846@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za> writes:
> In psql, is the \ that appears before a command supposed to terminate the
> existing query line (if any), as well as escape the command from the query?

If you think that that logic needs rejiggering, be careful you don't
break \r (clear the query buffer, don't send the query) or \g (send
accumulated query, arranging to dump its output into a file). I think
there are some other backslash commands that interact with the query
accumulation buffer, as well.

I sort of thought that the basic idea is that backslash commands are
parsed and executed without any effect on the state of an incompletely
entered query, except when the specific backslash command is defined to
do something with the query buffer. I might be all wet though.

If you got distracted by this point while working on making the query
buffer indefinitely extensible, I'd counsel fixing one bug at a time...

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-07-20 14:47:41 Re: [HACKERS] Another reason to redesign querytree representation
Previous Message Tom Lane 1999-07-20 14:11:57 Re: [HACKERS] Another reason to redesign querytree representation