pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hélder M. Vieira <hmv@mail.telepac.pt>
To: postgres sql <pgsql-sql@postgresql.org>
Subject: Re: backup and document views and user functions
Date: Mon, 30 Aug 2010 19:49:48 +0100
Message-ID: <4E7D507109C04F01A205FAB5D7E0607D@Hmv03> (raw)
In-Reply-To: <4C7BF692.3030903@gmail.com>
References: <4C7BF692.3030903@gmail.com>

Hi.

>I am looking for an easy way to backup views and functions. I want to store 
>them in our version control system.

Well... As far as I can see, for functions you should go to the 'pg_catalog' 
schema, table 'pg_proc'. In column 'prosrc' you will find the original text, 
but other attributes are dispersed in a few columns, including arrays for 
argument names and types. For views, you should look in the view 'pg_views'.
This is the result of a quick reading through the catalog, I hope I can only 
hope I'm not missing something, please check carefully if this is waht 
you're looking for.

Regards,

Helder M. Vieira




view thread (6+ messages)  latest in thread

Message-ID: <4E7D507109C04F01A205FAB5D7E0607D@Hmv03>
Permalink:  ../4E7D507109C04F01A205FAB5D7E0607D@Hmv03/
Also on:    postgresql.org/message-id/4E7D507109C04F01A205FAB5D7E0607D@Hmv03

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: hmv@mail.telepac.pt
  Subject: Re: backup and document views and user functions
  In-Reply-To: <4E7D507109C04F01A205FAB5D7E0607D@Hmv03>

* 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