Re: PATCH: Added Node Type & Catalog objects [pgAdmin4]

Поиск
Список
Период
Сортировка
От Murtuza Zabuawala
Тема Re: PATCH: Added Node Type & Catalog objects [pgAdmin4]
Дата
Msg-id CAKKotZTFTsZ2fHwMQem6v9prw8Un_qa8SqRmSanvU5eMXmTW8A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PATCH: Added Node Type & Catalog objects [pgAdmin4]  (Dave Page <dpage@pgadmin.org>)
Ответы Re: PATCH: Added Node Type & Catalog objects [pgAdmin4]  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-hackers
Hi Dave,

We can create new external type using below method, By running all of below queries at the same time , we can not create separate external type by only using create type statement.

So as per my discussion with Ashesh, We should not allow user to create external type in pgAdmin4 but only show definition in edit mode.

CREATE OR REPLACE FUNCTION geometry_1_in(cstring)
        RETURNS geometry_1
        AS '$libdir/postgis-2.2','LWGEOM_in'
        LANGUAGE 'c' IMMUTABLE STRICT;

CREATE OR REPLACE FUNCTION geometry_1_out(geometry_1)
        RETURNS cstring
        AS '$libdir/postgis-2.2','LWGEOM_out'
        LANGUAGE 'c' IMMUTABLE STRICT;

CREATE OR REPLACE FUNCTION geometry_1_typmod_in(cstring[])
        RETURNS integer
        AS '$libdir/postgis-2.2','geometry_typmod_in'
        LANGUAGE 'c' IMMUTABLE STRICT;

CREATE OR REPLACE FUNCTION geometry_1_typmod_out(integer)
        RETURNS cstring
        AS '$libdir/postgis-2.2','postgis_typmod_out'
        LANGUAGE 'c' IMMUTABLE STRICT;

CREATE OR REPLACE FUNCTION geometry_1_analyze(internal)
        RETURNS bool
        AS '$libdir/postgis-2.2', 'gserialized_analyze_nd'
        LANGUAGE 'c' VOLATILE STRICT;

CREATE OR REPLACE FUNCTION geometry_1_recv(internal)
        RETURNS geometry_1
        AS '$libdir/postgis-2.2','LWGEOM_recv'
        LANGUAGE 'c' IMMUTABLE STRICT;

CREATE OR REPLACE FUNCTION geometry_1_send(geometry_1)
        RETURNS bytea
        AS '$libdir/postgis-2.2','LWGEOM_send'
        LANGUAGE 'c' IMMUTABLE STRICT;

CREATE TYPE public.geometry_1
   (INPUT=geometry_1_in,
       OUTPUT=geometry_1_out,
       RECEIVE=geometry_1_recv,
       SEND=geometry_1_send,
       TYPMOD_IN=geometry_1_typmod_in,
       TYPMOD_OUT=geometry_1_typmod_out,
       ANALYZE=geometry_1_analyze,
       CATEGORY='U', DEFAULT='',
       INTERNALLENGTH=-1, ALIGNMENT=double, STORAGE=MAIN);



Please find inline comment for other two issues & updated patch attached.


Regards,
Murtuza

On Friday 18 March 2016 10:22 PM, Dave Page wrote:

Hi

On Fri, Mar 18, 2016 at 7:15 AM, Murtuza Zabuawala
<murtuza.zabuawala@enterprisedb.com> wrote:

Hi Dave,

Even after installing PosGIS I’m not able to create new custom external type
because the SQL does not return any value (Same behaviour as is in pgAdmin3)
, But I’m able to list all of it’s properties of external types same as
pgAdmin3 (PFA screenshots).

Hmm, I wonder if that's a pgAdmin 3 bug. Please check the CREATE TYPE
docs, and make sure the queries we're using are appropriate to find
suitable functions. It's possible we've messed that up.

I have also attached patch for plain fields control (without lable & border)
for backform. (Please apply it before testing new type patch)

That looks better. I'll commit that patch.

- I'm allowed to edit ENUM label names, but PostgreSQL doesn't support that.

This issue still exists.

This is working fine for me with same patch, labels coming from server are not editable but we can add new labels (PFA screenshot)


I also noticed some weirdness with the error message display - please
see the attached screenshots. The one complaining about the missing
name is as I'd expect. The second one is showing the error message an
additional time. Please look at that.

Done 
(PFA patch for sub node control also, there was an issue with subnode control error handling which I've fixed it, please apply patch then test Type node)

I've attached an updated patch - I cleaned up some strings and
localisation tags in this version.

Thanks.


Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Ashesh Vashi
Дата:
Сообщение: pgAdmin 4 commit: Allow to create sub-menu/menu-group by specify the sa
Следующее
От: Murtuza Zabuawala
Дата:
Сообщение: Fwd: Stalled post to pgadmin-hackers