Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
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


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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group