pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Snippets?
Date: Fri, 24 May 2019 13:20:37 -0500
Message-ID: <cb13d04b-2143-36f7-3f6e-f0d0979092d7@gmail.com> (raw)
In-Reply-To: <f0bac938148e4f4f8fa69d65de427258@pkwillis.com>
References: <f0bac938148e4f4f8fa69d65de427258@pkwillis.com>

On 5/24/19 1:15 PM, Ken Lacrosse wrote:
>
> Is there any way in postgresql to have a "snippet" of SQL code which you 
> could apply to all tables.  Something you could add which would ensure 
> that every table always has a Created, Changed and Deleted column for 
> example.  Sort of like a C include I suppose.  Of course if I’m building a 
> DB schema by hand I could just copy and paste those columns but it still 
> seems a bit too, darn humans!, error prone.
>

Inheritance might be what you want.

-- 
Angular momentum makes the world go 'round.

view thread (7+ messages)  latest in thread

Message-ID: <cb13d04b-2143-36f7-3f6e-f0d0979092d7@gmail.com>
Permalink:  ../cb13d04b-2143-36f7-3f6e-f0d0979092d7@gmail.com/
Also on:    postgresql.org/message-id/cb13d04b-2143-36f7-3f6e-f0d0979092d7@gmail.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: ronljohnsonjr@gmail.com
  Subject: Re: Snippets?
  In-Reply-To: <cb13d04b-2143-36f7-3f6e-f0d0979092d7@gmail.com>
  References: <f0bac938148e4f4f8fa69d65de427258@pkwillis.com> <cb13d04b-2143-36f7-3f6e-f0d0979092d7@gmail.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