Re: user defined data type

From: vikas vashista <er(dot)vikasvashista(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Cc: Michael Gould <mgould(at)intermodalsoftwaresolutions(dot)net>
Subject: Re: user defined data type
Date: 2009-10-23 06:27:57
Message-ID: 167ed6110910222327n509b220bm913bda0feacdb63b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi
thanx for your reply.

but my problem not solved till yet as i stated in previous mail.
I'm give more details of problem.

I had build a user define data type as

CREATE TYPE compfoo AS (f1 int, f2 text);

after that i had created a table AUDIT in which the fields are
(tablename of varchar, operation of varchar, and datachange of compfoo[])
but when i tried to insert values in datachange field its showing e error.
tell how can we used user defined data types ?
and what the actual procedure to insert values in that particular
field having user defined datatype?

with regrds
vikas

===========================================================================================================================================

On Thu, Oct 22, 2009 at 7:07 PM, Michael Gould <
mgould(at)intermodalsoftwaresolutions(dot)net> wrote:

> I think what you might be looking for is a domain which allows you to build
> custom data types. That being said, you still have to use the normally
> defined data types to build yours from. A good example would be a address
> data type which would have all of the components of a address in the data
> type, kind of like a structure.
>
>
>
> "vikas vashista" <er(dot)vikasvashista(at)gmail(dot)com> wrote:
>
> hi
>
> my aim is to put a the UPDATE operation result showing which field updated
> with having details of field name, old value & new vale.
> i had written the trigger for it, and that working fine.
> But for a very large database i want to use array for dynamic length.
> I want to create user defined data type and want to used in array type for
> input the output of my trigger of UPDATE operation.
>
> how can i built user defined data type?
> how can i used my user defined data type for array?
>
> with regrds
> vikas
>
>
> ------------------------------
> Michael Gould, Managing Partner
> Intermodal Software Solutions, LLC
> 904.226.0978
> 904.592.5250 fax
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Nathaniel Trellice 2009-10-23 11:43:12 Re: creating view - conditional testing in construct
Previous Message richard terry 2009-10-22 23:21:35 creating view - conditional testing in construct