Re: BUG #5419: Default parameters in PLPGSQL functions skipping every other value in pgAdmin view
От | Pavel Stehule |
---|---|
Тема | Re: BUG #5419: Default parameters in PLPGSQL functions skipping every other value in pgAdmin view |
Дата | |
Msg-id | v2i162867791004132336s8e361a49ua33bebeb868aa082@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #5419: Default parameters in PLPGSQL functions skipping every other value in pgAdmin view ("Cris Pond" <cpondwork@yahoo.com>) |
Список | pgsql-bugs |
2010/4/14 Cris Pond <cpondwork@yahoo.com>: > > The following bug has been logged online: > > Bug reference: =C2=A0 =C2=A0 =C2=A05419 > Logged by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Cris Pond > Email address: =C2=A0 =C2=A0 =C2=A0cpondwork@yahoo.com > PostgreSQL version: 8.4.2 > Operating system: =C2=A0 Ubuntu 9.10 kernel linux 2.6.31-20-generic > Description: =C2=A0 =C2=A0 =C2=A0 =C2=A0Default parameters in PLPGSQL fun= ctions skipping every > other value in pgAdmin view > Details: > > I define a function as such: > > create or replace function _users ( > =C2=A0 =C2=A0 =C2=A0 =C2=A0_mode varchar (1) default null, > =C2=A0 =C2=A0 =C2=A0 =C2=A0_id int4 default null, > =C2=A0 =C2=A0 =C2=A0 =C2=A0_username varchar default null, > =C2=A0 =C2=A0 =C2=A0 =C2=A0_encryptedpassword varchar default null, > =C2=A0 =C2=A0 =C2=A0 =C2=A0_accountenabled bool default null, > =C2=A0 =C2=A0 =C2=A0 =C2=A0_administrationenabled bool default null, > ... > > It compiles and functions correctly. > > When I go to the pgAdmin interface to view the function, it skips the > default value for every other parameter! =C2=A0Like so: > > CREATE OR REPLACE FUNCTION _users( > =C2=A0 =C2=A0 =C2=A0 =C2=A0_mode character varying DEFAULT NULL::characte= r varying, > =C2=A0 =C2=A0 =C2=A0 =C2=A0_id integer, > =C2=A0 =C2=A0 =C2=A0 =C2=A0_username character varying DEFAULT NULL::inte= ger, > =C2=A0 =C2=A0 =C2=A0 =C2=A0_password character varying, > =C2=A0 =C2=A0 =C2=A0 =C2=A0_accountenabled boolean DEFAULT NULL::characte= r varying, > =C2=A0 =C2=A0 =C2=A0 =C2=A0_administrationenabled boolean, > > ... > > You can see the types are mismatched, and the function won't compile. > > Oddly enough, this error does not occur in the M$ version of Postgres. > > Am I doing something wrong, or is this really a bug? probably you use old pgAdmin without support DEFAULT values :(. Please, try to actualise your pgAdmin. Regards Pavel Stehule > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs >
В списке pgsql-bugs по дате отправления: