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