On Mon, 2007-03-19 at 13:03 -0700, Reece Hart wrote:
> The harder and more general case is to build such a query dynamically
> from pg_depends
...
> See the pg_depends documentation at
Apologies. I intended to write pg_constraint and the documentation at
http://www.postgresql.org/docs/8.2/inte
On Mon, 2007-03-19 at 11:12 -0500, Glen W. Mabey wrote:
> What I'm hoping to find out is whether there is some way to directly
> find out how many (using a SELECT query) references there are to a
> key.
In the easy case when your schema doesn't change often, you can just
hard code a query of the
On Mon, Mar 19, 2007 at 09:46:22AM -0700, Stephan Szabo wrote:
> On Mon, 19 Mar 2007, Glen W. Mabey wrote:
>
> > Hello,
> >
> > I'm using 8.1.8, and I have a situation where a record in one table is
> > only meaningful when it is referenced via foreign key by one or more
> > records in any one of
On 3/19/07, Glen W. Mabey <[EMAIL PROTECTED]> wrote:
> write a triggers which do that.
I understand that a trigger should be written, and I have already
implemented two such triggers, as described above.
no, i think i didn't make myself clear.
let's use this situation:
we have tables:
create ta
Glen W. Mabey wrote:
On Mon, Mar 19, 2007 at 04:51:57PM +0100, hubert depesz lubaczewski wrote:
On 3/19/07, Glen W. Mabey <[EMAIL PROTECTED]> wrote:
I'm using 8.1.8, and I have a situation where a record in one table
is
only meaningful when it is referenced via foreign key by one or mor
"Glen W. Mabey" <[EMAIL PROTECTED]> writes:
> What I'm hoping to find out is whether there is some way to directly
> find out how many (using a SELECT query) references there are to a key.
There's no hidden shortcut for that, no.
regards, tom lane
On Mon, 19 Mar 2007, Glen W. Mabey wrote:
> Hello,
>
> I'm using 8.1.8, and I have a situation where a record in one table is
> only meaningful when it is referenced via foreign key by one or more
> records in any one of several tables.
>
> So, really what I want is when one of the referring recor
On Mon, Mar 19, 2007 at 04:51:57PM +0100, hubert depesz lubaczewski wrote:
> On 3/19/07, Glen W. Mabey <[EMAIL PROTECTED]> wrote:
> >I'm using 8.1.8, and I have a situation where a record in one table
> >is
> >only meaningful when it is referenced via foreign key by one or more
> >records in any on
On 3/19/07, Glen W. Mabey <[EMAIL PROTECTED]> wrote:
But, really, I just want to be able to test to see how many references
there are to a key. Is there some way to do that?
write a triggers which do that.
depesz
--
http://www.depesz.com/ - nowy, lepszy depesz
---(en
Hello,
I'm using 8.1.8, and I have a situation where a record in one table is
only meaningful when it is referenced via foreign key by one or more
records in any one of several tables.
So, really what I want is when one of the referring records is deleted,
to have a trigger check to see if it was
10 matches
Mail list logo