From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Pravesh Sharma <pravesh(dot)sharma(at)enterprisedb(dot)com> |
Cc: | pgadmin-hackers(at)postgresql(dot)org |
Subject: | Re: Require suggestion for issue #8007 |
Date: | 2024-10-08 13:04:02 |
Message-ID: | CA+OCxozKmbRHDdtFVy0AfGtQy7FncUb8B+0VtZaxQaXpybnZtw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
On Tue, 8 Oct 2024 at 13:56, Pravesh Sharma <pravesh(dot)sharma(at)enterprisedb(dot)com>
wrote:
> Hi Hackers,
>
> We have been working on issue #8007
> <https://github.com/pgadmin-org/pgadmin4/issues/8007>. After our
> analysis, we found that the length and scale of the argument's data type
> are not stored in the database server, making it difficult to fetch. In the
> debugger, pgAdmin typecasts the provided value to its data type when
> calling the function, which is causing the issue.
>
> If we typecast the value to a character without specifying the length, it
> is treated as a character (1) (character of length 1). For example, the
> output of SELECT 'pgadmin', 'pgadmin'::character; is different.
>
> There are two solutions we can consider:
>
> 1. Do not typecast if the data type is character.
> 2. Typecast to varchar when the data type is character.
>
> Please provide your suggestions which solution looks good to you.
>
Why not include the length in the cast? We know what the input string is,
so can't we just do the equivalent of:
'pgadmin'::character(7);
--
Dave Page
pgAdmin: https://www.pgadmin.org
PostgreSQL: https://www.postgresql.org
EDB: https://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Pravesh Sharma | 2024-10-08 15:30:03 | Re: Require suggestion for issue #8007 |
Previous Message | Pravesh Sharma | 2024-10-08 12:56:16 | Require suggestion for issue #8007 |