Re: pg_receivewal.exe unhandled exception in zlib1.dll

2022-02-22 Thread Juan José Santamaría Flecha
Please excuse my late reply. On Wed, Feb 16, 2022 at 12:20 PM Juan José Santamaría Flecha < juanjo.santama...@gmail.com> wrote: > On Tue, Feb 15, 2022 at 5:25 PM Andres Freund wrote: > >> >> FWIW, I've looked at using either vcpkg or conan to more easily >>

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Juan José Santamaría Flecha
ck-patching, if needed. As for HEAD at least, this LGTM. Regards, Juan José Santamaría Flecha

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Juan José Santamaría Flecha
file. c:\>Windows/System32/notepad.exe 'Windows' is not recognized as an internal or external command, operable program or batch file. Regards, Juan José Santamaría Flecha

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Juan José Santamaría Flecha
On Mon, Mar 1, 2021 at 7:50 PM Alvaro Herrera wrote: > On 2021-Mar-01, Juan José Santamaría Flecha wrote: > > > This is not a problem with the APi, but the shell. e.g. when using a CMD: > > > > - This works: > > c:\>c:\Windows\System32\notepad.exe > > c:

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Juan José Santamaría Flecha
On Mon, Mar 1, 2021 at 9:09 PM Alvaro Herrera wrote: > On 2021-Mar-01, Juan José Santamaría Flecha wrote: > > > On Mon, Mar 1, 2021 at 7:50 PM Alvaro Herrera > > wrote: > > > > Ah, so another way to fix it would be to make the path to pg_ctl be > > > abso

Re: [PATCH] Bug fix in initdb output

2021-03-01 Thread Juan José Santamaría Flecha
On Mon, Mar 1, 2021 at 10:18 PM Alvaro Herrera wrote: > On 2021-Mar-01, Juan José Santamaría Flecha wrote: > > > Uhm, now that you point it out, an absolute path would make the message > > more consistent and reusable. > > Well. This code was introduced in a00c5831

Re: Add support for PROVE_FLAGS and PROVE_TESTS in MSVC scripts

2021-03-03 Thread Juan José Santamaría Flecha
e be set + on a Windows terminal as follows, before running + vcregress: + +set PROVE_FLAGS=--timer +set PROVE_TESTS=t/020*.pl t/010*.pl + + This seems to me as if setting the variables in the shell is the proposed way to do so. In the previous doc point we do the same with the buildenv.pl file. It looks inconsistent, as if it was one way or the other, when it could be either. Regards, Juan José Santamaría Flecha

Re: Add support for PROVE_FLAGS and PROVE_TESTS in MSVC scripts

2021-03-04 Thread Juan José Santamaría Flecha
On Thu, Mar 4, 2021 at 3:11 AM Michael Paquier wrote: > On Wed, Mar 03, 2021 at 08:59:30PM +0100, Juan José Santamaría Flecha > wrote: > > This seems to me as if setting the variables in the shell is the proposed > > way to do so. In the previous doc point we do the same with

Re: Confusing behavior of psql's \e

2021-03-10 Thread Juan José Santamaría Flecha
api/fileapi/nf-fileapi-getfiletime#remarks Regards, Juan José Santamaría Flecha

Re: Collation versioning

2020-11-03 Thread Juan José Santamaría Flecha
l hope for the best :-) > There has been some talk about pushing _WIN32_WINNT to newer releases, but ended without an actual patch for doing so. Maybe we can revisit that in another thread. [1] https://www.postgresql.org/message-id/20200218065418.GK4176%40paquier.xyz Regards, Juan José Santamaría Flecha

Re: Collation versioning

2020-11-03 Thread Juan José Santamaría Flecha
On Tue, Nov 3, 2020 at 10:49 PM Thomas Munro wrote: > > So we have: > > 1. Windows locale names, like "English_United States.1252". Windows > still returns these from setlocale(), so they finish up in datcollate, > and yet some relevant APIs don't accept them, at least on some > machines. > > 2

Re: More time spending with "delete pending"

2020-11-16 Thread Juan José Santamaría Flecha
t using GetFileAttributesEx(). That might work as fall back to the CreateFile() if the file attribute is not a FILE_ATTRIBUTE_REPARSE_POINT. Anyhow, I do not think any retry logic should be in the stat() function, but in the caller. Regards, Juan José Santamaría Flecha > >

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2021-12-12 Thread Juan José Santamaría Flecha
ired argument pointing to + the directory where the tests reside. For example, use the following + command for running the subcription TAP tests: Regards, Juan José Santamaría Flecha

Re: WIN32 pg_import_system_collations

2021-12-13 Thread Juan José Santamaría Flecha
On Mon, Dec 13, 2021 at 9:41 AM Juan José Santamaría Flecha < juanjo.santama...@gmail.com> wrote: Per path tester. > Regards, > > Juan José Santamaría Flecha > v2-0001-WIN32-pg_import_system_collations.patch Description: Binary data

Re: WIN32 pg_import_system_collations

2021-12-14 Thread Juan José Santamaría Flecha
o run the test, you need a database that has successfully run pg_import_system_collations. This would be also possible in Mingw for _WIN32_WINNT> = 0x0600, but the current value in src\include\port\win32.h is _WIN32_WINNT = 0x0501 when compiling with Mingw. > Regards, Juan José Santamaría Flecha

Re: Windows default locale vs initdb

2021-12-15 Thread Juan José Santamaría Flecha
s://docs.microsoft.com/en-us/globalization/locale/locale-names Regards, Juan José Santamaría Flecha 0001-POC-Make-Windows-locale-POSIX-looking.patch Description: Binary data

Fix vcregress plpython3 warning

2022-01-07 Thread Juan José Santamaría Flecha
] http://commitfest.cputube.org/ Regards, Juan José Santamaría Flecha 0001-Fix-vcregress-plpython3-warning.patch Description: Binary data

Re: Fix vcregress plpython3 warning

2022-01-07 Thread Juan José Santamaría Flecha
hon2?u/EXTENSION plpython3u/g s/EXTENSION ([^ ]*)_plpython2?u/EXTENSION \$1_plpython3u/g Regards, Juan José Santamaría Flecha

Re: Fix vcregress plpython3 warning

2022-01-07 Thread Juan José Santamaría Flecha
On Fri, Jan 7, 2022 at 2:56 PM Juan José Santamaría Flecha < juanjo.santama...@gmail.com> wrote: copy-paste > s/EXTENSION plpython2?u/EXTENSION plpython3u/g > s/EXTENSION ([^ ]*)_plpython2?u/EXTENSION $1_plpython3u/g >

Re: Fix vcregress plpython3 warning

2022-01-07 Thread Juan José Santamaría Flecha
On Fri, Jan 7, 2022 at 3:24 PM Andrew Dunstan wrote: > > In that case, just this should work: > > s/EXTENSION (\S*?)plpython2?u/EXTENSION $1plpython3u/g ; > > LGTM. Regards, Juan José Santamaría Flecha

Re: Fix vcregress plpython3 warning

2022-01-10 Thread Juan José Santamaría Flecha
/37/3507/ Regards, Juan José Santamaría Flecha

Re: Fix vcregress plpython3 warning

2022-01-10 Thread Juan José Santamaría Flecha
On Mon, Jan 10, 2022 at 12:51 PM Juan José Santamaría Flecha < juanjo.santama...@gmail.com> wrote: > Please find attached a patch for so. > The patch. > > Regards, > > Juan José Santamaría Flecha > v2-0001-Fix-vcregress-plpython3-warnings.patch Description: Binary data

Re: Fix vcregress plpython3 warning

2022-01-10 Thread Juan José Santamaría Flecha
On Mon, Jan 10, 2022 at 4:14 PM Andrew Dunstan wrote: > > Pushed, and backpatched. > > Great, thanks. Regards, Juan José Santamaría Flecha

Re: [PATCH] Bug fix in initdb output

2021-03-22 Thread Juan José Santamaría Flecha
been made here. > > The OP claimed that the printed command was not working 'as-is', which is a valid complaint. Quoting the command seems like a complete answer for this, as it will solve problems with spaces and such for both Windows and Unix-like systems. Regards, Juan José Santamaría Flecha

Re: A micro-optimisation for walkdir()

2020-09-02 Thread Juan José Santamaría Flecha
more > places than walkdir(). > Win32 could also benefit from this micro-optimisation if we expanded the dirent port to include d_type. Please find attached a patch that does so. Regards, Juan José Santamaría Flecha 0002-Add-d_type-to-WIN32-dirent-port.patch Description: Binary data

Re: A micro-optimisation for walkdir()

2020-09-04 Thread Juan José Santamaría Flecha
r 'd_type'. */ > > +enum > > + { > > + DT_UNKNOWN = 0, > > +# define DT_UNKNOWN DT_UNKNOWN > > Uhm ... what do these #defines do? They look a bit funny. > > Would it make sense to give this enum a name, and then use that name in > struct dirent's definition, instead of unsigned char? > They mimic POSIX dirent.h. I would rather stick to that. Regards, Juan José Santamaría Flecha

Re: A micro-optimisation for walkdir()

2020-09-04 Thread Juan José Santamaría Flecha
On Fri, Sep 4, 2020 at 10:28 PM Alvaro Herrera wrote: > On 2020-Sep-04, Juan José Santamaría Flecha wrote: > > > On Fri, Sep 4, 2020 at 9:37 PM Alvaro Herrera > > wrote: > > > > > On 2020-Sep-04, Thomas Munro wrote: > > > > > >

Re: A micro-optimisation for walkdir()

2020-09-05 Thread Juan José Santamaría Flecha
Find{First,Next}File() functions populate? > > That'd be better... > At first I did not see how to get DT_LNK directly, but it is possible without additional calls, so please find attached a version with that logic. This version also drops the enum, defining just the macros. Regard

Re: A micro-optimisation for walkdir()

2020-09-07 Thread Juan José Santamaría Flecha
unt a whole filesystem (mount point) or just a directory off > something mounted elsehwere (junction). > > > > And yes, the wikipedia page confirms that junctions also use > IO_REPARSE_TAG_MOUNT_POINT. > > Thanks for confirming. I ran the Windows patch through pgindent, > fixed

Re: Windows build warnings

2021-11-23 Thread Juan José Santamaría Flecha
gt; For instance, a local variable may exist solely for use in an > assert() > statement, which makes the local variable unused when NDEBUG is > defined." > > [[maybe_unused]] is also recognized from Visual Studio 2017 onwards [1]. [1] https://docs.m

Re: BUG #15858: could not stat file - over 4GB

2019-09-04 Thread Juan José Santamaría Flecha
ore resilient solution. Also, by using a handle we get a good test for ERROR_DELETE_PENDING. This is the approach for the attached patch. Regards, Juan José Santamaría Flecha 0001-WIP-support-for-large-files-on-Win32-v4.patch Description: Binary data

Re: don't see materialized views in information_schema

2019-09-11 Thread Juan José Santamaría Flecha
ted somewhere in > information_schema. > There has been previous discussion about this topic: https://www.postgresql.org/message-id/3794.1412980...@sss.pgh.pa.us Regards, Juan José Santamaría Flecha

Re: Allow to_date() and to_timestamp() to accept localized names

2019-09-18 Thread Juan José Santamaría Flecha
weird issues. The localized search is reformulated in this version to deal with multibyte normalization. A regression test for this issue is included. Regards, Juan José Santamaría Flecha 0001-Allow-localized-month-names-to_date-v2.patch Description: Binary data

Wrong results using initcap() with non normalized string

2019-09-20 Thread Juan José Santamaría Flecha
Hello, I have come around a strange situation when using a unicode string that has non normalized characters. The attached script 'initcap.sql' can reproduce the problem. The attached patch can fix the issue. Regards, Juan José Santamaría Flecha initcap.sql Description: applicatio

Re: Wrong results using initcap() with non normalized string

2019-09-22 Thread Juan José Santamaría Flecha
e available [1]. Nowadays this particular issue seems like low hanging fruit, but I agree it would be problematic if it was the only normalization-aware function, although most functions are sure to be troubleless if nothing has been reported before. The attached patch addresses the comment about

Re: Allow to_date() and to_timestamp() to accept localized names

2019-09-22 Thread Juan José Santamaría Flecha
On Wed, Sep 18, 2019 at 11:09 AM Juan José Santamaría Flecha wrote: > > On Fri, Sep 13, 2019 at 10:31 PM Alvaro Herrera > wrote: > > > Thanks for taking a look at this. > > > I'm confused why we acquire the MONTH_DIM / etc definitions. Can't we > > jus

Re: Allow to_date() and to_timestamp() to accept localized names

2019-09-26 Thread Juan José Santamaría Flecha
On Wed, Sep 25, 2019 at 9:57 PM Alvaro Herrera wrote: > > This patch no longer applies. Can you please rebase? Thank you for the notification. The patch rot after commit 1a950f3, a rebased version is attached. Regards, Juan José Santamaría Flecha diff --git a/doc/src/sgml/func.sgml b/d

Re: Wrong results using initcap() with non normalized string

2019-10-03 Thread Juan José Santamaría Flecha
len, so this approach would also works for all the other encodings that do not use combining characters. Please find attached a patch with this approach. Regards, Juan José Santamaría Flecha diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index f7175df..8af62

Re: Non-Active links being referred in our source code

2019-10-07 Thread Juan José Santamaría Flecha
e other hand, the last case is quoting a document that is no longer available, I would suggest to rephrase the comment, thus eliminating the quote. Please find attached a patch with the proposed alternatives. Regards, Juan José Santamaría Flecha 0001-Non-Active-links-in-win32_port.patch Description: Binary data

Re: Small patch to fix build on Windows

2019-08-07 Thread Juan José Santamaría Flecha
= '"' . $self->{options}->{openssl} . '"' . $opensslprog; It can be a question of taste, but I think the dot is easier to read. Regards, Juan José Santamaría Flecha

Allow to_date() and to_timestamp() to accept localized names

2019-08-18 Thread Juan José Santamaría Flecha
reasonable way to go. Regards, Juan José Santamaría Flecha 0001-Allow-localized-month-names-to_date.patch Description: Binary data

Re: Allow to_date() and to_timestamp() to accept localized names

2019-08-22 Thread Juan José Santamaría Flecha
On Sun, Aug 18, 2019 at 10:42 AM Juan José Santamaría Flecha wrote: > > Going through the current items in the wiki's todo list, I have been > looking into: "Allow to_date () and to_timestamp () to accept > localized month names". > I have gone through a second tak

Re: Allow to_date() and to_timestamp() to accept localized names

2019-08-23 Thread Juan José Santamaría Flecha
On Thu, Aug 22, 2019 at 9:38 PM Juan José Santamaría Flecha wrote: > > > > > Going through the current items in the wiki's todo list, I have been > > looking into: "Allow to_date () and to_timestamp () to accept > > localized month names". > > >

Re: BUG #15858: could not stat file - over 4GB

2019-10-28 Thread Juan José Santamaría Flecha
. [1] https://www.postgresql.org/docs/current/install-windows.html [2] https://wiki.postgresql.org/wiki/Working_With_VisualStudio Regards, Juan José Santamaría Flecha

Re: TAP tests aren't using the magic words for Windows file access

2019-11-06 Thread Juan José Santamaría Flecha
org/pod/Win32API::File > > Compatibility-wise, that should be okay, since that module appears to > have been distributed with Perl core early on. > > Please find attached a patch that adds the FILE_SHARE options to TestLib::slurp_file using Win32API::File. Regards, Juan José Santamarí

Re: TAP tests aren't using the magic words for Windows file access

2019-11-07 Thread Juan José Santamaría Flecha
version of Msys is that system using? In a recent installation (post 1.0.11) I see that those modules are available. Regards, Juan José Santamaría Flecha

Re: Collation versions on Windows (help wanted, apply within)

2019-11-08 Thread Juan José Santamaría Flecha
| t | 24 | en-US | en-US | 6020f,6020f (5 rows) The error code 87 is an ERROR_INVALID_PARAMETER that is raised when the collate input does not match a valid tag, I would suggest not returning it directly. Regards, Juan José Santamaría Flecha [1] https://www.postgres

Re: Collation versions on Windows (help wanted, apply within)

2019-11-09 Thread Juan José Santamaría Flecha
On Fri, Nov 8, 2019 at 12:44 AM Thomas Munro wrote: > > recommend a better way to display the collation version as text. > > There is a major and a minor version. The attached patch applies on top the previous. Regards, Juan José Santamaría Flecha 0001-Add-collation-versions-for-

Re: BUG #16108: Colorization to the output of command-line has unproperly behaviors at Windows platform

2019-11-15 Thread Juan José Santamaría Flecha
ng a note stating this feature requires Windows 10 >= 1511 update is really a Postgres business. Please find attached a version that supports older Mingw versions and SDKs. Regards, Juan José Santamaría Flecha v2-0001-command-line-colorization-on-windows.patch Description: Binary data

Re: logical decoding : exceeded maxAllocatedDescs for .spill files

2019-11-19 Thread Juan José Santamaría Flecha
> https://www.postgresql.org/message-id/flat/CABuU89MfEvJE%3DWif%2BHk7SCqjSOF4rhgwJWW6aR3hjojpGqFbjQ%40mail.gmail.com > > The files from pgwin32_open() are open for synchronous access, while pg_pread() uses the asynchronous functionality to offset the read. Under these circunstances, a read past EOF will return ERROR_HANDLE_EOF (38), as explained in: https://devblogs.microsoft.com/oldnewthing/20150121-00/?p=44863 Regards, Juan José Santamaría Flecha

Re: logical decoding : exceeded maxAllocatedDescs for .spill files

2019-11-20 Thread Juan José Santamaría Flecha
h an antivirus touching Postgres files. I was not able to reproduce the Permission denied error with current HEAD, until I opened another CMD inside the "pg_replslot/regression_slot" folder. This will be problematic, is the deletion of the folder actually needed? Regards, Juan José Santamaría Flecha

Re: logical decoding : exceeded maxAllocatedDescs for .spill files

2019-11-21 Thread Juan José Santamaría Flecha
On Thu, Nov 21, 2019 at 5:02 AM Amit Kapila wrote: > On Wed, Nov 20, 2019 at 5:41 PM Juan José Santamaría Flecha > wrote: > > > > On Wed, Nov 20, 2019 at 9:48 AM Amit Khandekar > wrote: > >> > >> On Wed, 20 Nov 2019 at 13:10, Amit Kapila > wrote: &g

Re: TAP tests aren't using the magic words for Windows file access

2019-11-21 Thread Juan José Santamaría Flecha
we > > could, on Windows only, add code to TestLib.pm's INIT to rebind > > *CORE::GLOBAL::open to a wrapper function that would just do > > CreateFile(..., PLEASE_BE_MORE_LIKE_UNIX, ...). > > > Possibly. I will do some testing on drongo in the next week or so. > >

Re: TAP tests aren't using the magic words for Windows file access

2019-11-22 Thread Juan José Santamaría Flecha
On Fri, Nov 22, 2019 at 9:00 AM Michael Paquier wrote: > On Thu, Nov 21, 2019 at 08:09:38PM +0100, Juan José Santamaría Flecha > wrote: > > I think Perl's open() is a bad candidate for an overload, so I will > update > > the previous patch that only touches slurp_file

Re: logical decoding : exceeded maxAllocatedDescs for .spill files

2019-11-25 Thread Juan José Santamaría Flecha
On Fri, Nov 22, 2019 at 4:38 AM Amit Kapila wrote: > On Thu, Nov 21, 2019 at 8:32 PM Juan José Santamaría Flecha > wrote: > > > > [1] Win10 (1903) MSVC 19.22.27905 > > > > I have tested this on Windows7. I am not sure if it is due to a > different version of w

Re: dropdb --force

2019-11-29 Thread Juan José Santamaría Flecha
tted, would it make sense > to mark this entry as committed in the CF app? > > Test 051_dropdb_force.pl is failing on Windows critters in the build farm, e.g: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=drongo&dt=2019-11-29%2003%3A54%3A06 Regards, Juan José Santamaría Flecha

Re: Collation versions on Windows (help wanted, apply within)

2019-12-16 Thread Juan José Santamaría Flecha
| C| und-x-icu | i| -1 | und | und | 153.97 [... resumed ...] c_test | c|6 | C| C| (757 rows) Shouldn't it be NULL? Regards,

Re: Windows port minor fixes

2019-12-16 Thread Juan José Santamaría Flecha
gt; > If you want to address 2 unrelated issues, it makes little sense to use a single thread and 3 patches. Regards, Juan José Santamaría Flecha

Re: [PATCH] Windows port add support to BCryptGenRandom

2019-12-18 Thread Juan José Santamaría Flecha
is possible to build PostgreSQL using the GNU compiler tools for older versions of Windows, that should be also updated. [1] https://www.postgresql.org/docs/current/install-windows.html Regards, Juan José Santamaría Flecha

Re: Clean up some old cruft related to Windows

2019-12-19 Thread Juan José Santamaría Flecha
gt; > This is probably not an issue for the supported MSVC and their SDK, but current MinGW defaults to Windows 2003 [1]. So I would suggest a logic like: #define WINNTVER(ver) ((ver) >> 16) #define NTDDI_VERSION 0x06000100 #define _WIN32_WINNT WINNTVER(NTDDI_VERSION) [1] https://github.com/mirror/mingw-w64/blob/master/mingw-w64-headers/include/sdkddkver.h Regards, Juan José Santamaría Flecha

Re: color by default

2019-12-31 Thread Juan José Santamaría Flecha
think it would be better to rebase that patch on top of this, as the Windows function enable_vt_mode() incorporates the logic of both isatty() and terminal_supports_color() by enabling CMDs support of VT100 escape codes. Regards, Juan José Santamaría Flecha

Re: Allow to_date() and to_timestamp() to accept localized names

2020-01-13 Thread Juan José Santamaría Flecha
renaming to "nitems" >or "nelements" or something like that. > Agreed, using "nelements" as a better style matchup. Please, find attached a version addressing the above mentioned. [1] https://www.postgresql.org/docs/current/functions-formatting.html Regards, Juan José Santamaría Flecha > 0001-Allow-localized-month-names-to_date-v5.patch Description: Binary data

Re: Allow to_date() and to_timestamp() to accept localized names

2020-01-15 Thread Juan José Santamaría Flecha
; > + from_char_seq_search(&value, &s, months, > localized_names, > > + > ONE_UPPER, MAX_MON_LEN, n, have_error, > > + > lengthof(months_full)); > > Here it passes "months" from datetime.c to from_char_seq_search() and > ca

Re: [PATCH] Windows port, fix some resources leaks

2020-01-21 Thread Juan José Santamaría Flecha
review if you break this patch into smaller and independent committable patches, as one per file. Regards, Juan José Santamaría Flecha

Re: Allow to_date() and to_timestamp() to accept localized names

2020-01-24 Thread Juan José Santamaría Flecha
uld it be worth moving str_tolower(localized_name) from seq_search_localized() into cache_locale_time()? [1] https://www.postgresql.org/message-id/014866c8-d7ff-2a4f-c185-cf7e3ceb7028%402ndquadrant.com Regards, Juan José Santamaría Flecha 0001-Allow-localized-month-names-to_date-v8.patch Description: Binary data

Re: Allow to_date() and to_timestamp() to accept localized names

2020-01-24 Thread Juan José Santamaría Flecha
you suggest? > > To illustrate the issue, it does not work as expected: postgres=# select lower(to_char(now(),'TMMONTH')); lower ιανουάριοσ (1 row) postgres=# select to_char(now(),'TMmonth'); to_char ιανουάριος (1 row) Regards, Juan José Santamaría Flecha

Re: Allow to_date() and to_timestamp() to accept localized names

2020-01-28 Thread Juan José Santamaría Flecha
s is something that the patch should aim to, I am fine with a RWF and give it another try in the future. [1] https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?view=vs-2019 Regards, Juan José Santamaría Flecha

Re: Allow to_date() and to_timestamp() to accept localized names

2020-01-28 Thread Juan José Santamaría Flecha
;Sonnabend" is neither available in ICU. What is available are both genitive and nominative forms for months, as reported up thread by Peter. See formats "M" and "L" in: http://userguide.icu-project.org/formatparse/datetime Regards, Juan José Santamaría Flecha

TM format can mix encodings in to_char()

2019-04-12 Thread Juan José Santamaría Flecha
Hackers, I will use as an example the code in the regression test 'collate.linux.utf8'. There you can find: SET lc_time TO 'tr_TR'; SELECT to_char(date '2010-04-01', 'DD TMMON '); to_char - 01 NIS 2010 (1 row) The problem is that the locale 'tr_TR' uses the encoding ISO-8859-

Re: TM format can mix encodings in to_char()

2019-04-22 Thread Juan José Santamaría Flecha
Actually, I tried to show my findings with the tr_TR regression test, but you can reproduce the same issue with other locales and non-ASCII characters, as Tom has pointed out. For exampe: de_DE ISO-8859-1: March es_ES ISO-8859-1: Wednesday fr_FR ISO-8859-1: February Regards, Juan José

Re: [Doc] pg_restore documentation didn't explain how to use connection string

2019-05-17 Thread Juan José Santamaría Flecha
of those tools also use the connection environment variables used by libpq: PGDATABASE Pgbench is documented [1]: pgbench [option...] [dbname] Regards, Juan José Santamaría Flecha [1] https://www.postgresql.org/docs/current/pgbench.html

Re: [Doc] pg_restore documentation didn't explain how to use connection string

2019-05-17 Thread Juan José Santamaría Flecha
So as a final note, dbname defaults to the username if no other information is found. Regards, Juan José Santamaría Flecha

Re: [Doc] pg_restore documentation didn't explain how to use connection string

2019-05-17 Thread Juan José Santamaría Flecha
ly supported. Regards, Juan José Santamaría Flecha

Compile using the Visual Studio 2019

2019-05-20 Thread Juan José Santamaría Flecha
Hello, While trying to setup a test environment under Windows I have managed to build the source using the latest Visual Studio 2019 [1]. It's only been tested in this one environment, Windows 10 x64, but the changes seem tool dependant only. Regards, Juan José Santamaría Flecha [1]

Re: Compile using the Visual Studio 2019

2019-05-20 Thread Juan José Santamaría Flecha
he notice, this comment update is > incorrect as VS 2017 also marks nmake with version 15. > > I don't want to keep this thread going any further, so I will check the other patch and see how it goes through this point. Regards, Juan José Santamaría Flecha

Re: MSVC Build support with visual studio 2019

2019-05-21 Thread Juan José Santamaría Flecha
n of Visual Studio is newer than the latest supported version. Returning the latest supported version instead."; return '14.00'; } Shouldn't the returned value be '14.20' for Visual Studio 2019? Regards, Juan José Santamaría Flecha [1] https://docs.microsoft.com/en-us/visualstudio/releases/2019/history#release-dates-and-build-numbers

Re: Should MSVC 2019 support be an open item for v12?

2019-05-21 Thread Juan José Santamaría Flecha
already one item about this in the commitfest [1]. > Of course, I'm not volunteering to do the work, but still ... > After all the noise I will help to review the patch. Regards, Juan José Santamaría Flecha [1] https://commitfest.postgresql.org/23/2122/ >

Re: MSVC Build support with visual studio 2019

2019-05-27 Thread Juan José Santamaría Flecha
n't changed the nmake version to 15, so still using the older version for comparison. + # The major visual stuido that is suppored has nmake version >= 14.20 and < 15. Other than that, since this is affects comments and docs, I have already tested that the patches build and pass tests on al

Re: buildfarm + meson

2023-02-27 Thread Juan José Santamaría Flecha
ongo's locales. > What seems to be failing is the setlocale() for 'de_DE'. I haven't been able to reproduce it locally, but I've seen something similar reported for python [1]. As a workaround, can you please test "SET lc_time TO 'de-DE';"? [1] https://bugs.python.org/issue36792 Regards, Juan José Santamaría Flecha

Re: WIN32 pg_import_system_collations

2023-02-27 Thread Juan José Santamaría Flecha
, which seems to be > what's needed. > The command that's failing is "SET lc_time TO 'de_DE';", and that area of code is untouched by this patch. As mentioned in [1], the problem seems to come from a Windows bug that the CI images and my development machines have patched out. I think we should change the locale name to make the test more robust, as the attached. But I don't see a problem with making an alias for the collations. Regards, Juan José Santamaría Flecha 0001-change-locale-name-for-test-collate.windows.win1252.patch Description: Binary data

Re: WIN32 pg_import_system_collations

2023-02-27 Thread Juan José Santamaría Flecha
El lun, 27 feb 2023, 23:05, Juan José Santamaría Flecha < juanjo.santama...@gmail.com> escribió: > > The command that's failing is "SET lc_time TO 'de_DE';", and that area of > code is untouched by this patch. As mentioned in [1], the problem seems to >

Re: WIN32 pg_import_system_collations

2023-02-28 Thread Juan José Santamaría Flecha
On Tue, Feb 28, 2023 at 12:55 PM Andrew Dunstan wrote: > On 2023-02-27 Mo 17:20, Juan José Santamaría Flecha wrote: > > > Hmm, yeah. I'm not sure I understand the point of this test anyway: > > > SELECT to_char(date '2010-03-01', 'DD TMMON ' COLL

Re: WIN32 pg_import_system_collations

2023-03-01 Thread Juan José Santamaría Flecha
n, which is great. Thank you for taking care of it. Regards, Juan José Santamaría Flecha

Re: pg_dump/pg_restore: Fix stdin/stdout handling of custom format on Win32

2023-03-07 Thread Juan José Santamaría Flecha
fail? > I don't think we should set st_mode for FILE_TYPE_UNKNOWN. > Per the documentation of GetFileType, FILE_TYPE_REMOTE is unused: > > https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfiletype > Perhaps it would be safer to fail in this case? > +1, we don't know what that might involve. [1] https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/get-osfhandle?view=msvc-170 Regards, Juan José Santamaría Flecha

Re: pg_dump/pg_restore: Fix stdin/stdout handling of custom format on Win32

2023-03-09 Thread Juan José Santamaría Flecha
On Tue, Mar 7, 2023 at 1:36 PM Juan José Santamaría Flecha < juanjo.santama...@gmail.com> wrote: > > On Thu, Mar 2, 2023 at 8:01 AM Michael Paquier > wrote: > >> >> The internal implementation of _pgstat64() is used in quite a few >> > places, so we'd

Re: pg_dump/pg_restore: Fix stdin/stdout handling of custom format on Win32

2023-03-13 Thread Juan José Santamaría Flecha
On Fri, Mar 10, 2023 at 2:37 AM Michael Paquier wrote: > On Fri, Mar 10, 2023 at 12:12:37AM +0100, Juan José Santamaría Flecha > wrote: > > I've broken the patch in two: > > 1. fixes the detection of unseekable files in checkSeek(), using logic > that > > hopefu

Fix fseek() detection of unseekable files on WIN32

2023-03-14 Thread Juan José Santamaría Flecha
Regards, Juan José Santamaría Flecha 0001-fix-fseek-detection-of-unseekable-files-for-WIN32.patch Description: Binary data

Re: pg_dump/pg_restore: Fix stdin/stdout handling of custom format on Win32

2023-03-14 Thread Juan José Santamaría Flecha
ease feel free to review it. [1] https://www.postgresql.org/message-id/CAC%2BAXB26a4EmxM2suXxPpJaGrqAdxracd7hskLg-zxtPB50h7A%40mail.gmail.com Regards, Juan José Santamaría Flecha

Re: Fix fseek() detection of unseekable files on WIN32

2023-03-15 Thread Juan José Santamaría Flecha
On Wed, Mar 15, 2023 at 5:57 AM Michael Paquier wrote: > On Tue, Mar 14, 2023 at 01:26:27PM +0100, Juan José Santamaría Flecha > wrote: > > As highlighted in [1] fseek() might fail to error even when accessing > > unseekable streams. > > > > PFA a patch that c

Re: Fix fseek() detection of unseekable files on WIN32

2023-03-16 Thread Juan José Santamaría Flecha
On Thu, Mar 16, 2023 at 2:05 AM Michael Paquier wrote: > On Wed, Mar 15, 2023 at 12:18:25PM +0100, Juan José Santamaría Flecha > wrote: > > PFA a new version of the patch. > > +_pgftello64(FILE *stream) > +{ > + DWORD fileType; > + > + fileType = GetFi

Re: Fix fseek() detection of unseekable files on WIN32

2023-03-19 Thread Juan José Santamaría Flecha
t could be backpatchable. This looks fine for HEAD, but are you planning on something similar for the other branches? Doesn't pgwin32_get_file_type() fit in dirmod.c? Might be a question of personal taste, I don't really have strong feelings against win32common.c. Regards, Juan José Santamaría Flecha

Re: Using AF_UNIX sockets always for tests on Windows

2023-01-16 Thread Juan José Santamaría Flecha
o it. This patch is the one the rest > are standing on, because the tests should match Unix in their level of > security. > Yes, this is correct. > > Only the first patch is modified, but I'm including all of them so they go through the cfbot. [1] https://learn.microsoft.com/en-

Re: WIN32 pg_import_system_collations

2022-04-11 Thread Juan José Santamaría Flecha
On Tue, Mar 22, 2022 at 2:00 AM Andres Freund wrote: > > Currently fails to apply, please rebase: > http://cfbot.cputube.org/patch_37_3450.log > > Marked as waiting-on-author. > > Please, find attached a rebased version, no other significant change. Regards, Juan José S

Re: [PATCH] Connection time for \conninfo

2020-03-16 Thread Juan José Santamaría Flecha
eel free to resubmit > in a future CF when you believe the feedback has been addressed. There is a duplicate entry as: https://commitfest.postgresql.org/27/2423/ Regards, Juan José Santamaría Flecha

Re: Collation versions on Windows (help wanted, apply within)

2020-03-23 Thread Juan José Santamaría Flecha
On Mon, Mar 23, 2020 at 5:59 AM Thomas Munro wrote: > > Done in this new 0002 patch (untested). 0001 removes the comment that > individual collations can't have a NULL version, reports NULL for > Linux/glibc collations like C.UTF-8 by stripping the suffix and > comparing with C and POSIX as sugg

Re: color by default

2020-03-24 Thread Juan José Santamaría Flecha
e in adding the functionality proposed in terminal_supports_color(). Regards, Juan José Santamaría Flecha

Re: Collation versions on Windows (help wanted, apply within)

2020-03-26 Thread Juan José Santamaría Flecha
use "locale -a" on > Unix. I'm not sure where the encoding is supposed to come from > though, which is why I didn't try to write a patch myself. > I will take a look at this when the current commitfest is over. Regards, Juan José Santamaría Flecha

Re: Can we get rid of GetLocaleInfoEx() yet?

2020-03-29 Thread Juan José Santamaría Flecha
n fixed in more > recent VS versions? If not, can we find another, more robust > way to do it? > While working on another issue I have seen this issue reproduce in VS2019. So no, it has not been fixed. Please find attached a patch that provides a better detection of the "uft8

Re: color by default

2020-03-29 Thread Juan José Santamaría Flecha
On Sun, Mar 29, 2020 at 11:56 AM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2020-03-24 15:34, Juan José Santamaría Flecha wrote: > > I think there is also some value in adding the functionality proposed in > > terminal_supports_color(). > > What

Re: Can we get rid of GetLocaleInfoEx() yet?

2020-03-29 Thread Juan José Santamaría Flecha
ward code.) > It works for the issue just fine, and more comments make a better a patch, so no objections from me. Regards, Juan José Santamaría Flecha

  1   2   3   >