Re: Postgres schema comparison.

From: Stef <svb(at)ucs(dot)co(dot)za>
To: John DeSoi <desoi(at)pgedit(dot)com>
Cc: pgsql-ADMIN(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Postgres schema comparison.
Date: 2005-03-07 15:09:14
Message-ID: 20050307170914.51376f05@svb.ucs.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

John DeSoi mentioned :
=> Develop a function that builds a string describing the tables/schemas
=> you want to compare. Then have your function return the md5 sum of the
=> string as the result. This will give you a 32 character value you can
=> use to determine if there is a mismatch.

OK, this may be exactly what I need. I've compiled and installed contrib/pgcrypto
and I want to use either one of :
Result data type | Schema | Name | Argument data types
------------------+--------+--------+---------------------
bytea | public | digest | bytea, text
bytea | public | digest | text, text

Is it possible to somehow pass the output of : "\d [TABLE NAME]"
to this function? If not, what would return me consistent text
that will describe the columns, indexes and primary keys of a table?

Kind Regards
Stefan

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message KÖPFERL Robert 2005-03-07 15:11:24 Re: Help on maintaining pgsql/data folder size
Previous Message Tom Lane 2005-03-07 14:35:44 Re: Build from file syntax troublem (part II).

Browse pgsql-sql by date

  From Date Subject
Next Message Stef 2005-03-07 15:22:06 Re: [SQL] Postgres schema comparison.
Previous Message Gary Stainburn 2005-03-07 14:44:31 Re: simple update from select ??