I have two tables joined by a foreign key constraint:
CREATE TABLE test_master(
id SERIAL PRIMARY KEY,
foo TEXT
);
CREATE TABLE test_detail(
id SERIAL PRIMARY KEY,
master BIGINT NOT NULL REFERENCES test_master(id) ON DELETE
CASCADE ON UPDATE CASCADE,
bar TEXT
);
Is ther
I have a "master-detail" kind of situation, as illustrated here:
CREATE TABLE master(
id SERIAL PRIMARY KEY,
foo TEXT
);
CREATE TABLE detail(
id SERIAL PRIMARY KEY
master BIGINT NOT NULL REFERENCES master(id),
bar TEXT
);
(this is a simplification, of cou
On Oct 13, 2008, at 3:08 PM, Adrian Klaver wrote:
-- Original message --
From: "Christopher Maier" <[EMAIL PROTECTED]>
As you can see, doing a row-by-row delete works fine, but when
doing a
bulk delete, all the before triggers are grouped
On Oct 10, 2008, at 5:16 PM, Christopher Maier wrote:
On Oct 10, 2008, at 4:53 PM, Tom Lane wrote:
Alvaro Herrera <[EMAIL PROTECTED]> writes:
Looks like you should revoke DELETE privilege from plain users, and
have your delete trigger be a security definer function. There
wo
I've got a series of triggers that are responsible for maintaining
deduced data in a table (background for this can be found in an
earlier mailing list posting: http://archives.postgresql.org/pgsql-sql/2008-10/msg00041.php)
.
This problem concerns the order in which my triggers are executed.
On Oct 10, 2008, at 4:53 PM, Tom Lane wrote:
Alvaro Herrera <[EMAIL PROTECTED]> writes:
Looks like you should revoke DELETE privilege from plain users, and
have your delete trigger be a security definer function. There
would be
another security definer function to delete non-deduced rows wh
On Oct 10, 2008, at 2:05 PM, Alvaro Herrera wrote:
Looks like you should revoke DELETE privilege from plain users, and
have your delete trigger be a security definer function. There
would be
another security definer function to delete non-deduced rows which
users
can call directly.
Thank
On Oct 10, 2008, at 1:23 PM, Adrian Klaver wrote:
Could you have the the trigger examine the row to see if it meets
the criteria for deletion. If it does RETURN a NON NULL value so the
trigger completes, otherwise RETURN NULL to prevent the DELETE.
Thanks for your reply, Adrian. This is ind
I have a table where some rows are originally entered, and others are
logically deduced from original rows by triggers. For instance, if
one row contains data indicating that "A < B" and another row
indicates "B < C", the triggers will generate a new row indicating
that "A < C". All deduc
Apologies if this posts twice... I've run into issues with the
listserv lately.
I am implementing an autosuggest-style text input for my site, where a
user can start typing the name of a thing (call it a 'Foo'), and get a
list of all things whose name starts with the string the user typed.
slowly), but
I was wondering if there was a more efficient way to do this kind of
thing.
Thanks in advance,
Christopher Maier
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command t
11 matches
Mail list logo