From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Daniel Verite <daniel(at)manitou-mail(dot)org> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Tests for psql \g and \o |
Date: | 2022-11-10 04:37:57 |
Message-ID: | Y2yAJW820Mx3iBXQ@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 01, 2022 at 12:42:47PM +0100, Daniel Verite wrote:
> It's a follow up to the discussion at [1]. Since this discussion
> already has a slot in the CF [2] with a committed patch, let's start a
> new separate thread.
+psql_like($node, "SELECT 'one' \\g | cat >$g_file", qr//, "one command \\g");
+my $c1 = slurp_file($g_file);
+like($c1, qr/one/);
Windows may not have an equivalent for "cat", no? Note that psql's
001_basic.pl has no restriction in place for Windows. Perhaps you
could use the same trick as basebackup_to_shell, where GZIP is used to
write some arbitrary data.. Anyway, this has some quoting issues
especially if the file's path has whitespaces? This is located in
File::Temp::tempdir, still it does not sound like a good thing to rely
on this assumption on portability grounds.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Regina Obe | 2022-11-10 04:44:07 | RE: Ability to reference other extensions by schema in extension scripts |
Previous Message | Ajin Cherian | 2022-11-10 04:04:49 | Re: Support logical replication of DDLs |