Creating types

From: Dave Page <dpage(at)postgresql(dot)org>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Creating types
Date: 2007-12-10 14:54:05
Message-ID: 475D530D.7000303@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Roberts, Jon 2007-12-10 15:07:25 Number of connections
Previous Message svn 2007-12-10 14:36:44 SVN Commit by dpage: r6884 - trunk/pgadmin3