pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: melvin6925 <melvin6925@gmail.com>
To: Mark Bannister <mark@injection-moldings.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Best method to display table information in predefined formats
Date: Wed, 08 Apr 2020 11:53:38 -0400
Message-ID: <5e8df2e7.1c69fb81.a0a5.c2c7@mx.google.com> (raw)
In-Reply-To: <06157723-5788-11a4-be4b-0041b2ec1673@injection-moldings.com>

Sounds like you should design a function to call custom views based on what is needed.Sent via the Samsung Galaxy S® 6, an AT&T 4G LTE smartphone
-------- Original message --------From: Mark Bannister <mark@injection-moldings.com> Date: 4/8/20  11:39  (GMT-05:00) To: Adrian Klaver <adrian.klaver@aklaver.com>, pgsql-general@lists.postgresql.org Subject: Re: Best method to display table information in predefined formats 
    
    
    On 4/8/2020 10:28 AM, Adrian Klaver
      wrote:
    
    On
      4/8/20 6:39 AM, Mark Bannister wrote:
      
      I am converting an application to
        postgresql.  On feature I have is functions that return custom
        displays of a table row.  For instance the company display
        function might display just the company name, or company name +
        other information.  It may also call other displays, for
        instance, address or phone numbers which in turn have display
        functions.  What is returned depends on context and other
        parameters.  The return value is typically displayed the ui in
        views of the table.  For instance a listing of purchase orders
        could list PO number, and use the company display function to
        list the company information.  Depending on the display it could
        show just the company name or complete details of the company
        (in the context of the PO).
        
        
        There is also a generic function that will display per-defined
        default fields so that a custom function is not required for
        each table.
        
        
        What is the best way to reproduce this and take advantage of
        postgresql caching?  These functions can be called a lot.
        
      
      
      I am not understanding what you are after, especially this part:
      
      
      "The return value is typically displayed the ui in views of the
      table"
      
      
      Are you saying the functions are called to fill in fields in a UI
      form or to populate a database side view?
      
      
      
        
        -- 
        
        Mark B
        
        
      
      
      
    
    
    
    Yes.  That's correct.
    
    
    
    -- 
      Mark B 
       
    
  

view thread (5+ messages)

Message-ID: <5e8df2e7.1c69fb81.a0a5.c2c7@mx.google.com>
Permalink:  ../5e8df2e7.1c69fb81.a0a5.c2c7@mx.google.com/
Also on:    postgresql.org/message-id/5e8df2e7.1c69fb81.a0a5.c2c7@mx.google.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: melvin6925@gmail.com, mark@injection-moldings.com, adrian.klaver@aklaver.com
  Subject: Re: Best method to display table information in predefined formats
  In-Reply-To: <5e8df2e7.1c69fb81.a0a5.c2c7@mx.google.com>
  References: <06157723-5788-11a4-be4b-0041b2ec1673@injection-moldings.com> <5e8df2e7.1c69fb81.a0a5.c2c7@mx.google.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