;FMRN') ... to
...to_char(i, 'RN') ...
which verifies that leading spaces are now handled in input
string with simple 'RN' when used with to_number.
Looking forward to your feedback.
Regards,
Hunaid Sohail
v8-0001-Add-roman-support-for-to_number-function.patch
Description: Binary data
eters should be shown
in this command. My suggestion:
- application_name
- encodings (maybe?)
- role (new patch)
- is_superuser
- session_authorization
- in_hot_standby
Feel free to suggest any additions or removals.
Regards,
Hunaid Sohail
On Tue, Jan 21, 2025 at 1:35 PM Hunaid Sohail wrote:
> Agreed. Your changes in v7 consumes leading spaces if leading space
> is present in format (' RN'). But we need it to work on cases like:
> SELECT to_number(' XIV', 'RN');
> So, I can add this lo
ue. It turns out I missed the rule that V, L, and D cannot
appear before a larger numeral.
As a result, cases like the following are also invalid:
SELECT to_number('VIX', 'RN');
SELECT to_number('LXC', 'RN');
SELECT to_number('DCM', 'RN');
select to_number('MMDCM', 'RN');
select to_number('CLXC', 'RN');
I just need to add an if statement to handle these cases correctly.
I will include the fix in the next patch, and also add these cases
to the regression tests.
Regards,
Hunaid Sohail
;
Agreed. Your changes in v7 consumes leading spaces if leading space
is present in format (' RN'). But we need it to work on cases like:
SELECT to_number(' XIV', 'RN');
So, I can add this logic in my next patch.
Regards,
Hunaid Sohail
Hi Tom,
On Sat, Jan 18, 2025 at 5:27 AM Tom Lane wrote:
> Hunaid Sohail writes:
> > I’ve attached a new patch that addresses comments 2, 3, and 4 from Tomas.
>
> I'm still quite unhappy that this doesn't tolerate trailing
> whitespace. That's not how other f
Hi,
On Thu, Jan 16, 2025 at 6:01 PM Alvaro Herrera
wrote:
> On 2025-Jan-16, Hunaid Sohail wrote:
>
> > server_encoding | UTF8
> > server_version| 18devel
> > client_encoding | UTF8
> > session_
lStyle | postgres
TimeZone | Asia/Karachi
integer_datetimes | on
in_hot_standby| off
(33 rows)
Looking forward to your feedback.
Regards,
Hunaid Sohail
v37-0001-Add-PQparameterNames-to-libpq-to-return-paramete.patch
Descr
ql | Displays the ALPN protocol
used in the SSL connection.
(15 rows)
I was wondering how we can show the descriptions of parameters
from PQparameterStatus. We can create an array of descriptions,
but if the order changes somehow, it can mess things up.
Looking forward to your opinions. Can we continue with this approach?
Regards,
Hunaid Sohail
lay parameters added in the future,
along with doc updates.
- David wants category information included.
IMO, we should continue with v35 and add all parameters from
PQparameterStatus,
as Sami suggested. The names themselves are informative enough.
Looking forward to your feedback.
Regards,
Hunaid Sohail
e official API.
The list is of type pgParameterStatus, which is an internal struct defined
in libpq-int.h.
As the file's header warns, including this file can lead to issues. Or am I
missing something?
Regards,
Hunaid Sohail
n",
> we should also show "Role Name", since either one of those
> values changing can result in a different "Superuser" value.
> In the example below, the user may be confused in thinking
> that "postgres" is not a superuser. Showing the role name
> will make the picture clearer. What do you think?
>
Agreed. However, since we're using the libpq API, I don't think we can
retrieve the role name.
Maybe remove "Session Authorization" instead?
Regards,
Hunaid Sohail
#x27;VV', 'RN') for that.
>
>
>> and
>>
>> if (!IS_VALID_SUB_COMB(currChar, nextChar))
>> return -1;
>>
> Noted. SELECT to_number('IL', 'RN') test can be added.
>
I’ve attached a new patch that addres
Hi,
I provided a patch a month ago with a new approach as suggested by David.
Unfortunately, it didn't get any attention in the November CF.
I would appreciate your feedback on whether we should proceed with this new
approach or stick with the previous one.
Regards,
Hunaid Sohail
'RN') test covers this if statement for the
subtraction part. But, I noticed that no test covers simple counts of V, L,
D.
I will add SELECT to_number('VV', 'RN') for that.
> and
>
> if (!IS_VALID_SUB_COMB(currChar, nextChar))
> return -1;
>
Noted. SELECT to_number('IL', 'RN') test can be added.
Regards,
Hunaid Sohail
| true
Library| OpenSSL
Protocol | TLSv1.3
Key Bits | 256
Cipher | TLS_AES_256_GCM_SHA384
Compression| off
ALPN | postgresql
I’m unsure if we need to expand the documentation further. I would
appreciate your suggestions on this.
Regards,
Hunaid Sohail
Hi,
I have attached a rebased patch if someone wants to review in the next CF.
No changes as compared to v4.
Regards,
Hunaid Sohail
>
From 951f3e9620f0d50fcdaff095652a07d6304b490c Mon Sep 17 00:00:00 2001
From: Hunaid Sohail
Date: Wed, 30 Oct 2024 12:00:47 +0500
Subject: [PATCH v5] Add ro
s are okay with this, I can work on this approach and will provide
a patch before the next CF.
Regards,
Hunaid Sohail
nged with SET SESSION AUTHORIZATION. See
the session_user() function in for more details.
Let me know if this is fine, then I can provide a new patch.
[1] https://www.postgresql.org/docs/current/functions-info.html
[2]
https://www.postgresql.org/docs/current/sql-set-session-authorization.html
Regards,
Hunaid Sohail
is it fine as is?
Session User: The session user's name;
see the session_user() function in
for more
details.
Any other changes required?
Regards,
Hunaid Sohail
Hi,
On Mon, Sep 30, 2024 at 11:16 PM Jim Jones
wrote:
> On 26.09.24 09:15, Hunaid Sohail wrote:
> > This patch renames "Current User" to "Authenticated User" as suggested
> > by me in my last email. I have also updated the documentation
> accordingly.
>
Hi,
This patch renames "Current User" to "Authenticated User" as suggested by
me in my last email. I have also updated the documentation accordingly.
On Tue, Sep 17, 2024 at 4:53 PM Hunaid Sohail wrote:
> We can update the docs as follows:
> Authenticated User: The na
Hi,
I have attached a new patch with following changes:
- Addressed minor issues identified by Tom.
- Rejected other formats with RN and updated the docs.
- Added a few more tests.
Regards,
Hunaid Sohail
>
v4-0001-Add-roman-support-for-to_number-function.patch
Description: Binary data
ost
Host Address | 127.0.0.1
Port | 5430
Protocol Version | 3
SSL Connection | false
GSSAPI Authenticated | false
Client Encoding | UTF8
Server Encoding | UTF8
Backend PID | 1337
```
We can update the docs as follows:
Authenticated User: The name of the user returned by PQuser().
Session User: The session user's name.
Opinions?
Regards,
Hunaid Sohail
g | UTF8
Backend PID | 89035
```
I have also updated the documentation.
Regards,
Hunaid Sohail
v34-0001-Add-psql-meta-command-conninfo.patch
Description: Binary data
protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384,
compression: off, ALPN: postgresql)
Connection Information
-[ RECORD 1 ]+---
Protocol Version | 3
SSL Connection | yes
GSSAPI Authenticated | no
Client Encoding | UTF8
Server Encoding | UTF8
Session User | hunaid
Backend PID | 109092
> Also, there are a few compilation warnings regarding const qualifiers:
>
Noted. I will fix them in the next patch.
Regards,
Hunaid Sohail
RECORD 1 ]+---
Protocol Version | 3
SSL Connection | no
GSSAPI Authenticated | no
Client Encoding | UTF8
Server Encoding | UTF8
Session User | hunaid
Backend PID | 55598
```
Regards,
Hunaid Sohail
From b011b1cc780fee4030147070db84dcc62edd10a9 Mon
Hi,
I have started working on the next version of the patch and have addressed
the smaller issues identified by Tom. Before proceeding further, I would
like to have opinions on some comments/questions in my previous email.
Regards,
Hunaid Sohail
On Mon, Sep 9, 2024 at 5:45 PM Hunaid Sohail
multiple rows.
[1]
https://www.postgresql.org/message-id/CP8P284MB249615AED23882E1E185C8ABEC3C2%40CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM
Regards,
Hunaid Sohail
e to
apply it.
make installcheck-world -> tested, passed
Documentation -> tested, passed
Regards,
Hunaid Sohail
ed | no
Client Encoding | UTF8
Server Encoding | UTF8
Session User | hunaid
Backend PID | 121800
(7 rows)
Regards,
Hunaid Sohail
v32-0001-Add-psql-meta-command-conninfo.patch
Description: Binary data
Hi,
I have attached a rebased patch.
Regards,
Hunaid Sohail
On Mon, Sep 9, 2024 at 6:22 PM Jim Jones wrote:
> Hi Hunaid
>
> On 02.08.24 14:11, Hunaid Sohail wrote:
> >
> > I have also edited the documentation and added it to the patch. Please
> > let me know
rmatting.c.gcov.html
> that almost none of the existing roman-number code paths are covered
> today. While it's not strictly within the charter of this patch
> to improve that, maybe we should try to do so --- at the very
> least it'd raise formatting.c's coverage score a few notches.
>
>
I see that you have provided a patch to increase test coverage of to_char
roman format including some other formats. I will try to add more tests for
the to_number roman format.
I will provide the next patch soon.
Regards,
Hunaid Sohail
>> SELECT i, to_char(i, 'FMRN') AS roman
>> FROM generate_series(1, 3999) AS i
>> ) SELECT bool_and(to_number(roman, 'RN') = i) FROM rows;
>>
>> bool_and
>> --
>> t
>> ```
>>
>
>
I have added this test
N') AS roman
> FROM generate_series(1, 3999) AS i
> ) SELECT bool_and(to_number(roman, 'RN') = i) FROM rows;
>
> bool_and
> --
> t
> ```
>
I also noticed there are no tests for to_char roman format. The test you
provided covers roman format in both to_char and to_number. I will add it.
Thank you.
Regards,
Hunaid Sohail
Looking forward to your feedback.
Regards,
Hunaid Sohail
On Tue, Sep 3, 2024 at 8:47 PM Maciek Sakrejda wrote:
> On Tue, Sep 3, 2024 at 6:29 AM Hunaid Sohail wrote:
> > I submitted the patch on Aug 30 because I read that new patches should
> be submitted in CF with "Open" stat
itted the patch on Aug 30 because I read that new patches should be
submitted in CF with "Open" status.
> On Fri, Aug 30, 2024 at 12:22 AM Hunaid Sohail
> wrote:
> >While looking at formatting.c file, I noticed a TODO about "add support
> for roman number to standard nu
ing or trailing spaces, like
' XIV' or 'MC '? Should we trim the spaces, or would it be better to throw
an error in such cases?
I have tested the changes and would appreciate any suggestions for
improvement. I will update the docs and regressions in the next version of
patch.
Regards,
Hunaid Sohail
v1-0001-Add-RN-rn-support-for-to_number-function.patch
Description: Binary data
uot; (address "127.0.0.1") at port "5430".
Protocol Version: 3
SSL Connection: no
GSSAPI Authenticated: no
Client Encoding: UTF8
Server Encoding: UTF8
Session User: hunaid
Backend PID: 163816
I have also edited the documentation and added it to the patch. Plea
39 matches
Mail list logo