pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: a <372660931@qq.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Questions on user defined data types
Date: Tue, 24 Apr 2018 19:53:01 +0800
Message-ID: <tencent_34A63D8D2D86225269E1A816@qq.com> (raw)

Hi there:


I want to ask the if I could define an object like type in postgresql, it may be better to illustrate with actual examples.


Background information:


    1, I would like to pack group of data into 1 entry of in a table.


    2, The table consist some financial product information including names, public data and etc.


    3, Each product need to be valued, and the packed entry contains all the assumptions (interest rate, etc.) to perform valuation calculation of the products.


Furthermore, for company management purpose, the packed data would have the following properties:


    1, Elements of the entry can be easily queried, using SQL;


    2, Change of element value is not allowed by simple update, only using pre-complied "methods" functions can update them;


    3, Changes using methods functions would be recorded into a specified sub-object called "LOG", which record down update information including update times and etc.


I am asking if this could be realized and if yes, how should I do it. 


Thank you so much ~~


Shore

view thread (2+ messages)  latest in thread

Message-ID: <tencent_34A63D8D2D86225269E1A816@qq.com>
Permalink:  ../tencent_34A63D8D2D86225269E1A816@qq.com/
Also on:    postgresql.org/message-id/tencent_34A63D8D2D86225269E1A816@qq.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: 372660931@qq.com
  Subject: Re: Questions on user defined data types
  In-Reply-To: <tencent_34A63D8D2D86225269E1A816@qq.com>
  References: <tencent_34A63D8D2D86225269E1A816@qq.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox