Re: PATCH: Added Node Type & Catalog objects [pgAdmin4] - Mailing list pgadmin-hackers

From Dave Page
Subject Re: PATCH: Added Node Type & Catalog objects [pgAdmin4]
Date
Msg-id CA+OCxowAevPwtNb1O6Shx1NndTjNJYPBd_ie-xnk4Hw4j-nKqA@mail.gmail.com
Whole thread Raw
In response to Re: PATCH: Added Node Type & Catalog objects [pgAdmin4]  (Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>)
Responses Re: PATCH: Added Node Type & Catalog objects [pgAdmin4]
List pgadmin-hackers
Hi

On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala
<murtuza.zabuawala@enterprisedb.com> wrote:
> 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.

Hmm, would it not make sense to allow the user to create the shell
type as well (perhaps, with a new type of "SHELL")? Then they could do
what is needed (and that should be easy, as it's just CREATE TYPE
foo;)

For example:

CREATE TYPE box;

CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ;
CREATE FUNCTION my_box_out_function(box) RETURNS cstring AS ... ;

CREATE TYPE box (
    INTERNALLENGTH = 16,
    INPUT = my_box_in_function,
    OUTPUT = my_box_out_function
);

CREATE TABLE myboxes (
    id integer,
    description box
);


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgadmin-hackers by date:

Previous
From: Murtuza Zabuawala
Date:
Subject: Fwd: Stalled post to pgadmin-hackers
Next
From: Nicola
Date:
Subject: Re: Fix PSQL Console plugin for OS X