public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dave Page <[email protected]>
To: Pravesh Sharma <[email protected]>
Cc: [email protected]
Subject: Re: Require suggestion for issue #8007
Date: Wed, 9 Oct 2024 09:59:43 +0100
Message-ID: <CA+OCxoyJnhprqdvVQ0nPOemLNpXghahTgJCaPd3+QYMioM9+nw@mail.gmail.com> (raw)
In-Reply-To: <CA+36bxH1HoXEAjeSJc9X+LnHtjny40B9Gm-dHYeK4vhOkPiBOQ@mail.gmail.com>
References: <CA+36bxGWg9GD=4LY_tv82YVy=X+DMLts+DXK=JsWcLdxVtiNiQ@mail.gmail.com>
<CA+OCxozKmbRHDdtFVy0AfGtQy7FncUb8B+0VtZaxQaXpybnZtw@mail.gmail.com>
<CA+36bxH1HoXEAjeSJc9X+LnHtjny40B9Gm-dHYeK4vhOkPiBOQ@mail.gmail.com>
On Tue, 8 Oct 2024 at 16:30, Pravesh Sharma <[email protected]>
wrote:
> Hi Dave,
>
> On Tue, Oct 8, 2024 at 6:34 PM Dave Page <[email protected]> wrote:
>
>>
>>
>> On Tue, 8 Oct 2024 at 13:56, Pravesh Sharma <
>> [email protected]> 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);
>>
> Just to confirm, this will be only for the character data type?
>
Yes, if that's the only type with which the issue is seen.
--
Dave Page
pgAdmin: https://www.pgadmin.org
PostgreSQL: https://www.postgresql.org
EDB: https://www.enterprisedb.com
view thread (4+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Require suggestion for issue #8007
In-Reply-To: <CA+OCxoyJnhprqdvVQ0nPOemLNpXghahTgJCaPd3+QYMioM9+nw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox