Re: CAST function for user defined type

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ron Peterson <ron(dot)peterson(at)yellowbank(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CAST function for user defined type
Date: 2007-01-22 15:36:20
Message-ID: 20070122153620.GC29762@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jan 22, 2007 at 09:44:52AM -0500, Ron Peterson wrote:
> I've created my own type: y_octet_16. Now I'm trying to create a CAST
> function for this type, but I'm not quite getting it.

Quick question: do you mean:

> val
> y_octet_16
^^^^^^^^^^
> VALUES
> ( 'aaa', encode( y_uuid_generate(), 'hex' )::y_byte_16 );
or ^^^^^^^^^

I'm not sure from your example of the difference? byte vs octet.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Muszynski 2007-01-22 15:55:43 Re: security question
Previous Message Martijn van Oosterhout 2007-01-22 15:33:39 Re: security question