Skip site navigation (1) Skip section navigation (2)

Re: PATCH for CREATE DATABASE with COLLATE, CTYPE & CONNECTION LIMIT

From: Ashesh D Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: PATCH for CREATE DATABASE with COLLATE, CTYPE & CONNECTION LIMIT
Date: 2008-11-18 10:57:43
Message-ID: 49229FA7.8060704@enterprisedb.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
Hi,

Please find the updated patch.
>
> Some thoughts (all minor), in no particular order:
>
> - Let's use 'Collation' and 'Character type' in both the properties
> list view and on the dialog for the labels - it'll look much nicer
> than COLLATE and CTYPE I think.
Done.
>
> - dlgDatabase needs to have it's sizing fixed - the cell holding the
> CTYPE controls is stretching, but it should be the comment cell that
> stretches (<growablerows> needs to change to 11 perhaps?).
Changed <growablerows> to 11.
>
> - Entering a new connection limit, and clicking the SQL tab doesn't
> show me an SQL statement if the value entered is too large, but does
> enable the OK button The easiest fix is probably to limit the number
> of characters the control will access. That should still allow a huge
> number to entered.
Maximum number allowed will be 2147483647.
Datatype for the datconnlimit is integer.
>
> - Entering a connection limit of -<anything but 1> is silently
> converted to 1. We should just ignore anything that isn't 1, rather
> than trying to correct it for the user.
Done.
>
> - 'Connection Limit' in the properties list should not have a capital L.
Done.
>
> - This code in dlgDatabase may be uneeded now?
>
> +    // As some of the controls has been made hidden,
> +    // Update() will help to rearrange all the other controls properly.
> +    this->Update();
Done.
>
> - The COLLATE and CTYPE options should be omitted from the CREATE
> DATBASE SQL generated by dlgDatabase, if the user hasn't specified
> values.
Done.
>
> - The CONNECTION LIMIT option seems to have an additional space in the indent:
>
> CREATE DATABASE foobar
>   WITH ENCODING='UTF8'
>        COLLATE=''
>        CTYPE=''
>         CONNECTION LIMIT=99;
Done.

Regards,
Ashesh

Attachment: COLLATE_CTYPE_CONN_LIMIT-v3.patch
Description: text/x-patch (18.9 KB)

In response to

Responses

pgadmin-hackers by date

Next:From: svnDate: 2008-11-18 13:09:53
Subject: SVN Commit by dpage: r7500 - in trunk/pgadmin3: . pgadmin/db pgadmin/dlg pgadmin/include/dlg pgadmin/include/parser pgadmin/include/schema pgadmin/schema pgadmin/ui
Previous:From: Dave PageDate: 2008-11-18 09:01:59
Subject: TODO List

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group