Creating types - Mailing list pgadmin-hackers

From Dave Page
Subject Creating types
Date
Msg-id 475D530D.7000303@postgresql.org
Whole thread Raw
Responses Re: Creating types
List pgadmin-hackers
A short while ago I noticed that there are a couple of issues when
creating new datatypes which essentially mean the disalogue is useless
for creating 'external' types (as opposed to enums or composite types.

The basic problem is that the input, output, send and receive functions
are have the type itself as either the return datatype or one of the
parameters. Postgres handles this chicken-and-egg situation by allowing
you to create a 'shell' type to then use to create the functions, which
then gets replaced with the real type.

On way we could handle this would be to allow the user to create the new
functions as part of the type definition process, but this seems like a
lot of work given that we've never had any bug reports about this (which
indicates noone is creating real types in pgAdmin anyway.

I'm currently thinking the way forward is to do the following:

- Allow the user to create shell types. This would be another option
alongside Composite, Enumeration and External.

- Populate the combo boxes for the aforementioned functions when the
user changes to the tab they're on, using the type name entered on the
first tab to select the appropriate functions.

Thoughts/better ideas?

/D

pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r6884 - trunk/pgadmin3
Next
From: "Roberts, Jon"
Date:
Subject: Number of connections