Re: pgAdmin III: the debugger does not pre-populate default values for arguments
От | Nikhil S |
---|---|
Тема | Re: pgAdmin III: the debugger does not pre-populate default values for arguments |
Дата | |
Msg-id | AANLkTik1D0+wvQ_v1AuuGDES+YS5LPt6Ev_zvvkhgcvH@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pgAdmin III: the debugger does not pre-populate default values for arguments (Dave Page <dpage@pgadmin.org>) |
Ответы |
Re: pgAdmin III: the debugger does not pre-populate
default values for arguments
|
Список | pgadmin-hackers |
Hi,
On Thu, Feb 10, 2011 at 8:48 PM, Dave Page <dpage@pgadmin.org> wrote:
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.
Regards,
Nikhils
On Mon, Feb 7, 2011 at 9:03 AM, Nikhil S <nixmisc@gmail.com> wrote:Even for non-strings?
> 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..
>
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.
Regards,
Nikhils
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
В списке pgadmin-hackers по дате отправления: