Re: pgAdmin III: the debugger does not pre-populate default values for arguments

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Nikhil S <nixmisc(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: pgAdmin III: the debugger does not pre-populate default values for arguments
Date: 2011-02-11 15:57:15
Message-ID: AANLkTikPNpcYLmdPfOYjV2By1jb7n+WnODgyAdq5fQTd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Fri, Feb 11, 2011 at 8:51 AM, Nikhil S <nixmisc(at)gmail(dot)com> wrote:
> Hi,
>
> On Thu, Feb 10, 2011 at 8:48 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>> On Mon, Feb 7, 2011 at 9:03 AM, Nikhil S <nixmisc(at)gmail(dot)com> wrote:
>> > One side-effect of this feature is that earlier where non-default
>> > variables
>> > appeared as empty, they will now appear with values "". This will happen
>> > only if some arguments have defvals and some don't. We could have added
>> > code
>> > to do away with "" entries, but then I thought it is possible for people
>> > to
>> > provide "" as default values too. So we can live with this I think..
>> >
>>
>> Even for non-strings?
>>
>
> Consider the following procedure:
>
> CREATE OR REPLACE PROCEDURE pass_proc(p1 IN INTEGER, p2 IN INTEGER, p3 IN
> INTEGER DEFAULT 0) IS
> BEGIN
>  dbms_output.put_line('Parameter #1 P1 = ' || p1);
> END;
>
> The pldbg_get_target_info() function call returns the following info for
> defvals for this procedure:
>
> {"","",0}
>
> Because of this the first two params will end up getting "" prepopulated.
>
> Note that if there are no default values, the the defvals column is
> completely empty. Now why we see the "" for non-default arguments - the
> issue seems to be on the server side in the contrib module calls to compute
> the default values.

We need to change that then - we can't have the missing default values
default to something that's not valid for that datatype. Change them
to null or just empty them?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Nikhil S 2011-02-11 16:11:33 Re: pgAdmin III: the debugger does not pre-populate default values for arguments
Previous Message Peter Geoghegan 2011-02-11 13:13:54 Re: phase 2 of wxWidgets 2.9 build