[Pgsql-ayuda] Usando CREATE TYPE AS

Alvaro Herrera alvherre@dcc.uchile.cl
Tue, 13 Jan 2004 20:22:26 -0300


On Tue, Jan 13, 2004 at 05:07:27PM +0000, Edwin Quijada wrote:

> Entonces, cual es la idea de poder declarar tipos?
> Puedo retornarlos?

Por supuesto ...

Lo de CREATE TYPE AS fue un agregado para las funciones que retornan
SETOF RECORD.  Puedes usar los otros tipos en tablas (esos que se
especifican con funciones de entrada y salida -- CREATE TYPE tipo (...),
sin AS)

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Doing what he did amounts to sticking his fingers under the hood of the
implementation; if he gets his fingers burnt, it's his problem."  (Tom Lane)