Re: How do I list foreign key info/relation

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: jason(at)netspade(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How do I list foreign key info/relation
Date: 2000-11-13 20:12:58
Message-ID: Pine.BSF.4.21.0011131208030.64995-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Unfortunately I don't think there's a good way to do it in SQL itself.
You might be able to do something in one of the procedural
languages. When i did the support for the older pg_dump (which may
look nothing like the current one), all I did was enhance the code that
was already there to handle constraint triggers.

You will probably have to break it up on the client side. If I get a
chance to do computer stuff other than job related stuff I'm probably
going to write something that will return a constraint string for fk
constraints that look like the original statement (plus or minus a
little).

Stephan Szabo
sszabo(at)bigpanda(dot)com

On Mon, 13 Nov 2000, Jason Davies wrote:

> Thanks for that. My problem now is it would be nice to have a way to get this
> in one SQL query. I can't find a way to split up the pg_trigger.tgargs column
> up into components. The data I need is separated by "\000", but the column type
> is bytea. How do I split it up? I've tried using instr and substr, but I can't
> get them to work.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthew 2000-11-13 21:01:33 RE: 7.0.3 RPMs?
Previous Message Jason Davies 2000-11-13 20:02:16 Re: How do I list foreign key info/relation