Hi,
I am unable to apply the patch on master. Can you please confirm if the patch
is rebased?
Regards,
Akshat Jaimini
Hello,
Here is a rebased and updated version of adding \gi:
- improved documentation
- some refactoring to share one function
- signal trap disabled on \gi as well
The thread subject is now a misnomer, I'm not sure whether I should
update it or start a new thread.
On 05/04/2025 22:14, Fabien
Hello Tom and Corey,
[...] Anyway, my feeling about it is that \copy parsing is a huge hack
right now, and I'd rather see it become less of a hack, that is
more like other psql commands, instead of getting even hackier.
After giving it some thoughts, I concluded that trying to salvage \copy
i
Fabien COELHO writes:
> I've been biten by psql's \copy lack of variable expansion, in a
> limited-access docker-inside-VM context where COPY is not a viable option and
> hardwired names are not desirable. The attached patch allows \copy to use
> variable's values in place of table and file nam
Always better with a file attached :-/
Sorry for the noise.
--
Fabien.
De : Fabien COELHO
Envoyé : lundi 31 mars 2025 13:48
À : PostgreSQL Hackers
Objet : Add partial :-variable expansion to psql \copy
Hello,
I've been biten by psql's \copy lack of variable ex
>
> I'm hesitating about the right syntax, though, for an input backslash
> command which in effect would really only apply to COPY? ISTM that \g* is
> used for "go", i.e. a semi-colon replacement which executes the SQL, and we
> should want the same thing, which suggests:
>
making it a \g-variant
Hello Corey,
If we could do this:
COPY :"myschema".:"mytable" FROM STDIN \g < :"myfilename"
that would fit our patterns most cleanly, but we would probably create
a parsing hassle for ourselves if we ever wanted to mix pipe-to with
pipe-from. It would also require checking on every comma
Christoph Berg wrote:
> Perhaps this form could be improved by changing `\copy (select) to file`
> to something like `select \gcopy (to file)`. That might make :expansion
> in the "select" part easier to handle.
In this direction (COPY TO), it was already taken care of by
commit 6d3ede5f1
Hi
út 1. 4. 2025 v 12:00 odesílatel Christoph Berg napsal:
> Re: Fabien Coelho
> > (1) it seems that is the only command which is really full SQL hidden in
> a
> > backslash command
>
> Perhaps this form could be improved by changing `\copy (select) to file`
> to something like `select \gcopy (t
Re: Fabien Coelho
> (1) it seems that is the only command which is really full SQL hidden in a
> backslash command
Perhaps this form could be improved by changing `\copy (select) to file`
to something like `select \gcopy (to file)`. That might make :expansion
in the "select" part easier to handle.
On 31/03/2025 17:09, Tom Lane wrote:
Fabien COELHO writes:
[...] The attached patch allows \copy to use variable's values in place of
table and file names:
Hm ... I'm on board with the general idea of the feature, but I find
this implementation quite horrid.
Indeed, I just added the stuff i
>
> Anyway, my feeling about it is that \copy parsing is a huge hack
> right now, and I'd rather see it become less of a hack, that is
> more like other psql commands, instead of getting even hackier.
>
I wasn't as horrified as Tom, but it did have the feeling of it solving
half the problem.
We c
12 matches
Mail list logo