Обсуждение: Added variable macro for generic db objects
Hi,
PFA patch to add another generic macro for variable control, previously written macro was specific to database node and not usable with other db objects.
How to use:
VARIABLE.SET(conn, object_type, object_name, variable_name, value)
VARIABLE.UNSET(conn, object_type, object_name, variable_name)
--
Regards,
Вложения
Hi,
PFA updated patch, I missed adding parentheses in previous patch for UNSET macro .
Thanks.
--
Regards,
On Tue, Feb 2, 2016 at 5:49 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,PFA patch to add another generic macro for variable control, previously written macro was specific to database node and not usable with other db objects.How to use:VARIABLE.SET(conn, object_type, object_name, variable_name, value)VARIABLE.UNSET(conn, object_type, object_name, variable_name)--Regards,
Вложения
Thanks - checked in!
On Tue, Feb 2, 2016 at 6:31 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,PFA updated patch, I missed adding parentheses in previous patch for UNSET macro .Thanks.--Regards,On Tue, Feb 2, 2016 at 5:49 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:Hi,PFA patch to add another generic macro for variable control, previously written macro was specific to database node and not usable with other db objects.How to use:VARIABLE.SET(conn, object_type, object_name, variable_name, value)VARIABLE.UNSET(conn, object_type, object_name, variable_name)--Regards,
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Hi Ashesh,
PFA updated patch for generic variable macro as per Neel's suggestion, now it will take collection instead of single key/value pair.
For example,
options_collection = [
{name: 'Option-1', value: 'Value-1'},
{name: 'Option-2', value: 'Value-2'},
{name: 'Option-3', value: 'Value-3'},
]
Way to use in template:
VARIABLE.SET(conn, object_type, object_name, options_collection)
VARIABLE.UNSET(conn, object_type, object_name, options_collection)
Result:
ALTER DB_OBJ TEST
SET (Option-1=Value-1, Option-2=Value-2, Option-3=Value-3);
ALTER DB_OBJ TEST
RESET (Option-1,Option-2,Option-3);
--
Regards,
On Tue, Feb 2, 2016 at 7:46 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
Thanks - checked in!On Tue, Feb 2, 2016 at 6:31 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:Hi,PFA updated patch, I missed adding parentheses in previous patch for UNSET macro .Thanks.--Regards,On Tue, Feb 2, 2016 at 5:49 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:Hi,PFA patch to add another generic macro for variable control, previously written macro was specific to database node and not usable with other db objects.How to use:VARIABLE.SET(conn, object_type, object_name, variable_name, value)VARIABLE.UNSET(conn, object_type, object_name, variable_name)--Regards,
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Вложения
On Wed, Feb 3, 2016 at 3:37 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Ashesh,PFA updated patch for generic variable macro as per Neel's suggestion, now it will take collection instead of single key/value pair.For example,options_collection = [{name: 'Option-1', value: 'Value-1'},{name: 'Option-2', value: 'Value-2'},{name: 'Option-3', value: 'Value-3'},]Way to use in template:VARIABLE.SET(conn, object_type, object_name, options_collection)VARIABLE.UNSET(conn, object_type, object_name, options_collection)Result:ALTER DB_OBJ TESTSET (Option-1=Value-1, Option-2=Value-2, Option-3=Value-3);ALTER DB_OBJ TESTRESET (Option-1,Option-2,Option-3);
Thanks - committed!
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
--Regards,On Tue, Feb 2, 2016 at 7:46 PM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:Thanks - checked in!On Tue, Feb 2, 2016 at 6:31 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:Hi,PFA updated patch, I missed adding parentheses in previous patch for UNSET macro .Thanks.--Regards,On Tue, Feb 2, 2016 at 5:49 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:Hi,PFA patch to add another generic macro for variable control, previously written macro was specific to database node and not usable with other db objects.How to use:VARIABLE.SET(conn, object_type, object_name, variable_name, value)VARIABLE.UNSET(conn, object_type, object_name, variable_name)--Regards,
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers