Hi,
I have a basic replica with pglogical 1.1 and postgres 9.5 on both servers
publisher and subscriber.
I have triggers on publisher and subscriber tables, but the trigger on
subscriber table is not being fired.
Is it possible to fire the trigger with pglogical replication?
Thanks in advance
Thank you Michael! I will let the admin know then!
--
View this message in context:
http://postgresql.nabble.com/Triggers-on-foreign-Postgres-9-3-tables-in-Postgres-9-4-tp5839559p5839749.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general
I just want to make sure I understood correctly.
All the triggers are firing in a single thread assigned to the connection
and will be run serially no matter how many tables are firing triggers.
If this is correct then yes I guess I have to create a queue of some sort
and process them via an
My company has a data warehouse, currently running on Postgres 9.3, as well
as the production servers also running on Postgres 9.3. We have connections
to foreign tables from the warehouse, however I've noticed that implementing
triggers on foreign tables is not supported in Postgres 9.3, and is a
On 02/25/2015 06:14 PM, Emanuel Araújo wrote:
Hi,
I have an application that replicates data from an Oracle database for
postgresql. The flow goes as follows:
oracle.table1 - AppSincronizador - postgresql.table1 - Trigger (upd,
ins, del) - postgresql.table2
I'm having situations where the
I want to write a trigger which runs semi-complicated code after each
insert. I have done some reading and from what I can gather this could
cause problems because after insert triggers don't spill to the disk and
can cause queue problems. Many people suggest LISTEN NOTIFY but that's
not going
On Thu, Feb 26, 2015 at 3:54 PM, Tim Uckun timuc...@gmail.com wrote:
I want to write a trigger which runs semi-complicated code after each
insert. I have done some reading and from what I can gather this could
cause problems because after insert triggers don't spill to the disk and
can cause
Tim Uckun timuc...@gmail.com writes:
I want to write a trigger which runs semi-complicated code after each
insert. I have done some reading and from what I can gather this could
cause problems because
after insert triggers don't spill to the disk and can cause queue
problems.  Many
On 2/26/2015 2:03 PM, Merlin Moncure wrote:
I would strongly advise you not to put complex processing in triggers
if at all possible. Instead have the insert operation write a record
into another table which forms a queue of work to do. That queue can
then be walked by another process which
On Fri, Feb 27, 2015 at 2:13 AM, MattF mfraz...@spacetimestudios.com wrote:
I've talked to the admin here and he said that upgrading to Postgres 9.4 is
possible, however the only risk is for us on the warehouse side is that it
is entirely possible that while the warehouse servers will be
Hi,
I have an application that replicates data from an Oracle database for
postgresql. The flow goes as follows:
oracle.table1 - AppSincronizador - postgresql.table1 - Trigger (upd,
ins, del) - postgresql.table2
I'm having situations where the data volume is large that the changes that
should
Hello Every one,
Is Postgresql providing triggers on DB level, schema level ( in same DB)?
Regards,
Itishree
the later ,in same db
jov
在 2013-7-5 下午4:32,itishree sukla itishree.su...@gmail.com写道:
Hello Every one,
Is Postgresql providing triggers on DB level, schema level ( in same DB)?
Regards,
Itishree
I didn't get you, you mean trigger is possible on schema level? if yes can
you give example.
Thank you
On Fri, Jul 5, 2013 at 3:56 PM, Jov zhao6...@gmail.com wrote:
the later ,in same db
jov
在 2013-7-5 下午4:32,itishree sukla itishree.su...@gmail.com写道:
Hello Every one,
Is Postgresql
itishree sukla, 05.07.2013 10:29:
Hello Every one,
Is Postgresql providing triggers on DB level, schema level ( in same DB)?
You are probably referring to DDL triggers and similar things (a trigger when
a table is created or dropped, a user logs in and so on).
The answer is no as far as I
Thomas Kellerer, 05.07.2013 13:46:
Postgres 9.3 will add event triggers, but they can only be written in SQL
That should have been: only C and procedural languages like PL/pgSQL
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
According to release notes of 8.3.18 (yeah, old docs)
a trigger runs with the the table owner permission.
This is the only document I found about this matter:
http://www.postgresql.org/docs/8.3/static/release-8-3-18.html
Require execute permission on the trigger function for CREATE TRIGGER
On Thu, Jun 27, 2013 at 4:58 AM, Sandro Santilli s...@keybit.net wrote:
According to release notes of 8.3.18 (yeah, old docs)
a trigger runs with the the table owner permission.
This is the only document I found about this matter:
http://www.postgresql.org/docs/8.3/static/release-8-3-18.html
Not sure if this is a feature request or a bug report.
I'm trying to use Foreign Tables for a variety of things and it is useful to
have a foreign table which appears to be read/write.
Having set one up, I can select data from it. However, I can't insert, update
or delete.
No worries,
On 04/04/2013 04:28 PM, Robert Lefkowitz wrote:
Not sure if this is a feature request or a bug report.
I'm trying to use Foreign Tables for a variety of things and it is useful to
have a foreign table which appears to be read/write.
Having set one up, I can select data from it. However, I
Hi!
I'm debugging few triggers I wrote these days, and I can't see the
triggers statements being logged.
Probably I'm doing something wrong.
I just enabled
log_statement = 'all'
In postgresql.conf, but I can see all statements issued by my
application, but the statements in trigger don't
Em 16/01/2013 13:56, Edson Richter escreveu:
Hi!
I'm debugging few triggers I wrote these days, and I can't see the
triggers statements being logged.
Probably I'm doing something wrong.
I just enabled
log_statement = 'all'
In postgresql.conf, but I can see all statements issued by my
Le vendredi 18 mars 2011 à 08:20 +, Grzegorz Jaśkiewicz a écrit :
There's a generic trigger that sends a signal to a process whenever
changes are made (via listen/notify mechanism), but when FK cascade
fires it will cause a mass amount of notifies to be send out and I
want to avoid it.
-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Grzegorz Jaskiewicz
Sent: Thursday, March 17, 2011 6:41 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] triggers and FK cascades
Considering the following example.
Tables A and B
Considering the following example.
Tables A and B.
Table A contains some data.
Table B reefers to table A using FK with 'on delete cascade'. Table B
has a trigger on it, after delete per row
Now, is there any way I can tell in the trigger on table B that it has
been called from a direct delete on
J.
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Grzegorz Jaskiewicz
Sent: Thursday, March 17, 2011 6:41 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] triggers and FK cascades
Considering the following
Dear all,
I have a single source table that is referenced by six
specialization tables, which include:
journal_article
report
4 more
There is a citation column in the source, which is what will be
displayed to users. This is generated by a trigger function on each
specialization table that
On 21 Sep 2010, at 16:13, William Temperley wrote:
Dear all,
I have a single source table that is referenced by six
specialization tables, which include:
journal_article
report
4 more
e.g.:
update source set citation = get_report_citation(
(select source from source where id
On 21 September 2010 18:39, Alban Hertroys
dal...@solfertje.student.utwente.nl wrote:
On 21 Sep 2010, at 16:13, William Temperley wrote:
Dear all,
I have a single source table that is referenced by six
specialization tables, which include:
journal_article
report
4 more
e.g.:
On Friday 18 December 2009 11:00:33 am sabrina miller wrote:
Hi everybody,
My requirements was:
+ Made a table charge to be partitioned by carrier and month
+ summarize by charges
+ summarize by users,
+ each summarization must be by month and several others columns.
Doesn't sound
Hi everybody,
My requirements was:
+ Made a table charge to be partitioned by carrier and month
+ summarize by charges
+ summarize by users,
+ each summarization must be by month and several others columns.
Here is the database
CREATE TABLE charges.charge
(
id serial NOT NULL,
How I cant optain de SQL (if is posible) of any STATEMENT in an AFTER Trigger
Function in C?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Tue, Apr 28, 2009 at 10:46 PM, David Fetter da...@fetter.org wrote:
On Tue, Apr 28, 2009 at 08:20:34PM -0600, Scott Marlowe wrote:
On Mon, Apr 27, 2009 at 3:24 PM, Richard Broersma
richard.broer...@gmail.com wrote:
On Mon, Apr 27, 2009 at 1:32 PM, Scott Marlowe scott.marl...@gmail.com
On Apr 29, 2009, at 4:20 AM, Scott Marlowe wrote:
Oh man, it just gets worse. I really need a simple elegant solution
here, because if I try to build the query by hand null inputs make
life a nightmare. I had built something like this:
q = 'insert into '||schem||'.page_access_'||part||'
Hi, it seems it didn't make it the first time.
Début du message réexpédié :
De : Dimitri Fontaine dfonta...@hi-media.com
Date : 30 avril 2009 12:03:10 HAEC
À : pgsql-general@postgresql.org
Objet : Rép : [GENERAL] triggers and execute...
On Monday 27 April 2009 22:32:22 Scott Marlowe wrote:
OK
On Monday 27 April 2009 22:32:22 Scott Marlowe wrote:
OK, I'm hitting a wall here. I've written this trigger for partitioning:
create or replace function page_access_insert_trigger ()
returns trigger as $$
DECLARE
part text;
q text;
BEGIN
part =
On Tue, Apr 28, 2009 at 11:24 PM, Scott Marlowe scott.marl...@gmail.com wrote:
On Tue, Apr 28, 2009 at 10:46 PM, David Fetter da...@fetter.org wrote:
On Tue, Apr 28, 2009 at 08:20:34PM -0600, Scott Marlowe wrote:
On Mon, Apr 27, 2009 at 3:24 PM, Richard Broersma
richard.broer...@gmail.com
On Tue, Apr 28, 2009 at 08:20:34PM -0600, Scott Marlowe wrote:
On Mon, Apr 27, 2009 at 3:24 PM, Richard Broersma
richard.broer...@gmail.com wrote:
On Mon, Apr 27, 2009 at 1:32 PM, Scott Marlowe scott.marl...@gmail.com
wrote:
OK, I'm hitting a wall here. I've written this trigger for
Scott Marlowe escribió:
Oh man, it just gets worse. I really need a simple elegant solution
here, because if I try to build the query by hand null inputs make
life a nightmare. I had built something like this:
q = 'insert into '||schem||'.page_access_'||part||' values (
On Wed, Apr 29, 2009 at 4:23 AM, Alban Hertroys
dal...@solfertje.student.utwente.nl wrote:
On Apr 29, 2009, at 4:20 AM, Scott Marlowe wrote:
Oh man, it just gets worse. I really need a simple elegant solution
here, because if I try to build the query by hand null inputs make
life a
I wonder if it would be easier to perodically replace the entire
trigger function with one that inserts to the correct table using
CRON+SED rather than dynamically building SQL. This might be a bad
idea however. I'm just thinking outside the box.
--
Regards,
Richard Broersma Jr.
Visit the
On 2009-04-29, Scott Marlowe scott.marl...@gmail.com wrote:
On Mon, Apr 27, 2009 at 3:24 PM, Richard Broersma
richard.broer...@gmail.com wrote:
On Mon, Apr 27, 2009 at 1:32 PM, Scott Marlowe scott.marl...@gmail.com
wrote:
OK, I'm hitting a wall here. I've written this trigger for
On Apr 29, 2009, at 4:14 AM, Jasen Betts wrote:
On 2009-04-29, Scott Marlowe scott.marl...@gmail.com wrote:
On Mon, Apr 27, 2009 at 3:24 PM, Richard Broersma
richard.broer...@gmail.com wrote:
On Mon, Apr 27, 2009 at 1:32 PM, Scott Marlowe scott.marl...@gmail.com
wrote:
OK, I'm hitting a
On Mon, Apr 27, 2009 at 03:37:22PM -0600, Scott Marlowe wrote:
On Mon, Apr 27, 2009 at 3:24 PM, Richard Broersma wrote:
At this point I don't think that there is a way for this function to
know the correct table type of new.* since page_access_... is still
only a concatenated string. There
On Mon, Apr 27, 2009 at 3:24 PM, Richard Broersma
richard.broer...@gmail.com wrote:
On Mon, Apr 27, 2009 at 1:32 PM, Scott Marlowe scott.marl...@gmail.com
wrote:
OK, I'm hitting a wall here. I've written this trigger for partitioning:
create or replace function page_access_insert_trigger ()
OK, I'm hitting a wall here. I've written this trigger for partitioning:
create or replace function page_access_insert_trigger ()
returns trigger as $$
DECLARE
part text;
q text;
BEGIN
part = to_char(new.timestamp,'MMDD');
q = 'insert into
On Mon, Apr 27, 2009 at 2:32 PM, Scott Marlowe scott.marl...@gmail.com wrote:
OK, I'm hitting a wall here. I've written this trigger for partitioning:
create or replace function page_access_insert_trigger ()
returns trigger as $$
DECLARE
part text;
q text;
BEGIN
part
On Mon, Apr 27, 2009 at 1:32 PM, Scott Marlowe scott.marl...@gmail.com wrote:
OK, I'm hitting a wall here. I've written this trigger for partitioning:
create or replace function page_access_insert_trigger ()
returns trigger as $$
DECLARE
part text;
q text;
BEGIN
part
On Mon, Apr 27, 2009 at 3:24 PM, Richard Broersma
richard.broer...@gmail.com wrote:
On Mon, Apr 27, 2009 at 1:32 PM, Scott Marlowe scott.marl...@gmail.com
wrote:
OK, I'm hitting a wall here. I've written this trigger for partitioning:
create or replace function page_access_insert_trigger ()
Hello Gustavo !
Gente, buenos dias.
Como consulto lo triggers desde psql?
Unfortunately I don't know Spanish. As far as I understand your
question was about triggers in postgresql. Trigger is the function
calls automatically on operations insert-delete-update.
--
Best regards,
Sincerely
Gente, buenos dias.
Como consulto lo triggers desde psql?
Gracias!
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hi all,
I wish to use a MPTT based table to store some hierachical datas. Here
is my table definition:
CREATE TABLE region (
id SERIAL NOT NULL,
full_path VARCHAR(255) NOT NULL,
lhs INTEGER NOT NULL,
rhs INTEGER NOT NULL,
level INTEGER NOT NULL,
Tom Lane a écrit :
Guillaume Lelarge [EMAIL PROTECTED] writes:
Fernando Moreno a écrit :
A trigger function must have a specific structure, it takes no arguments
It can take arguments.
No, it can't. At least not in the declaration.
Oops, you're right. Arguments shouldn't be declared,
El mié, 22-10-2008 a las 15:01 -0500, Ma. Cristina Peña C. escribió:
I want to use a function in to a trigger
This is my
CREATE FUNCTION subradio(integer) RETURNS integer AS 'select
cast(count (claveubica) as integer ) from asradios where ubicacion
=0;' LANGUAGE 'sql';
And
I want to use a function in to a trigger
This is my
CREATE FUNCTION subradio(integer) RETURNS integer AS 'select cast(count
(claveubica) as integer ) from asradios where ubicacion =0;' LANGUAGE 'sql';
And my ttrigger is
CREATE TRIGGER validaradios AFTER DELETE ON subestacion FOR EACH
2008/10/22 Ma. Cristina Peña C. [EMAIL PROTECTED]
I want to use a function in to a trigger
This is my
CREATE FUNCTION subradio(integer) RETURNS integer AS 'select cast(count
(claveubica) as integer ) from asradios where ubicacion =0;' LANGUAGE 'sql';
And my ttrigger is
CREATE
Fernando Moreno a écrit :
2008/10/22 Ma. Cristina Peña C. [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
I want to use a function in to a trigger
This is my
CREATE FUNCTION subradio(integer) RETURNS integer AS 'select
cast(count (claveubica) as integer ) from asradios where
Guillaume Lelarge [EMAIL PROTECTED] writes:
Fernando Moreno a écrit :
A trigger function must have a specific structure, it takes no arguments
It can take arguments.
No, it can't. At least not in the declaration.
regards, tom lane
--
Sent via pgsql-general mailing
Dale Harris [EMAIL PROTECTED] writes:
I'm running PostgreSQL 8.3.3 and I'm having trouble with triggers not always
working. I have the following tables and functions as documented below. My
problem is that if I perform an update on the Entity table and modify the
Code field, why doesn't the
: [GENERAL] Triggers not working
Dale Harris [EMAIL PROTECTED] writes:
I'm running PostgreSQL 8.3.3 and I'm having trouble with triggers not
always
working. I have the following tables and functions as documented below.
My
problem is that if I perform an update on the Entity table and modify
Dale Harris [EMAIL PROTECTED] writes:
The trigger trAccountUpdate got called, but why didn't the trigger
trEntityUpdate get called?
Triggers only apply to the exact table they're declared on, not
to child tables.
It does seem like there might be some use-case for applying a trigger to
child
:[EMAIL PROTECTED]
Sent: Tuesday, 23 September 2008 13:43
To: Dale Harris
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Triggers not working
Dale Harris [EMAIL PROTECTED] writes:
The trigger trAccountUpdate got called, but why didn't the trigger
trEntityUpdate get called?
Triggers
Hi,
I'm running PostgreSQL 8.3.3 and I'm having trouble with triggers not always
working. I have the following tables and functions as documented below. My
problem is that if I perform an update on the Entity table and modify the
Code field, why doesn't the trigger for the Entity table
Bonjour,
J'ai un trigger (AFTER FOR EACH ROW) sur une table qui à chaque fois
qu'il y a un enregistrement sur cette même table, exécute une fonction
pgplsql qui éxécute elle-même une fonction PL/sh qui exécute un script
PHP.
Dans ce script PHP, je créer 10 enregistrements dans une autre tables
Samuel ROZE a écrit :
[...]
J'ai un trigger (AFTER FOR EACH ROW) sur une table qui à chaque fois
qu'il y a un enregistrement sur cette même table, exécute une fonction
pgplsql qui éxécute elle-même une fonction PL/sh qui exécute un script
PHP.
Dans ce script PHP, je créer 10
Le mardi 26 août 2008 à 11:01 +0200, Guillaume Lelarge a écrit :
Samuel ROZE a écrit :
[...]
J'ai un trigger (AFTER FOR EACH ROW) sur une table qui à chaque fois
qu'il y a un enregistrement sur cette même table, exécute une fonction
pgplsql qui éxécute elle-même une fonction PL/sh qui
[see below]
Kerri Reno wrote:
Vance,
I missed your earlier post, so I may be misunderstanding the
situation, but I think you could do this more easily in plpython,
because TD['new'] and TD['old'] are dictionaries, and you can traverse
the dictionaries like this:
for k, v in
15, 2008 8:06 PM
To: Vance Maverick
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] triggers: dynamic references to fields in NEW and
OLD?
Vance Maverick wrote:
I have a bunch of tables that are similar in some ways, and I'm about
to put triggers on them. The triggers will all do
Thanks! Your solution clearly works, but it requires the shared function to
enumerate all possible column names. In my real case, there are 8-10
distinct names, so that's a bit uglybut it works.
Vance
-Original Message-
If you just need which table triggered the function then
Vance,
I missed your earlier post, so I may be misunderstanding the situation, but
I think you could do this more easily in plpython, because TD['new'] and
TD['old'] are dictionaries, and you can traverse the dictionaries like this:
for k, v in TD['new'].items():
if tblfld == k:
I have a bunch of tables that are similar in some ways, and I'm about to
put triggers on them. The triggers will all do essentially the same
thing -- the only wrinkle is that the name of the column they operate on
varies from table to table. I'd like to have just one trigger function,
written
Vance Maverick wrote:
I have a bunch of tables that are similar in some ways, and I'm about to
put triggers on them. The triggers will all do essentially the same
thing -- the only wrinkle is that the name of the column they operate on
varies from table to table. I'd like to have just one
I tried to restore database to 8.2.3 and 8.3 servers from pgAdmin
After restore triggers do not fire.
PgAdmin shows that trigger is attached to dok table:
CREATE TRIGGER dok_btrig
BEFORE INSERT
ON firma1.dok
FOR EACH ROW
EXECUTE PROCEDURE firma1.dok_seq_trig();
select reltriggers from
Triggers have never been inherited, right? Not in any version?
I'm pretty sure that's the case, but I'm debugging some old logging and just
need to confirm it.
--
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice
---(end of
Scott Ribe [EMAIL PROTECTED] writes:
Triggers have never been inherited, right? Not in any version?
AFAIR, no. If they had been I kinda doubt we would have removed it.
regards, tom lane
---(end of broadcast)---
TIP 4:
On Wed, Aug 01, 2007 at 09:30:25AM -0500, Weber, Geoffrey M. wrote:
I want to set a BOOLEAN column value to FALSE by default for all INSERT and
UPDATE statements performed against a particular table _UNLESS_ it's
explicitly set to TRUE in the SQL statement. Here is the trigger I created:
The
I'm having a problem, and can't seem to find a good answer in the mailing
list archives... sorry if I'm missing something obvious!
Postgres version: 8.2.4
O/S: Solaris 10
I want to set a BOOLEAN column value to FALSE by default for all INSERT and
UPDATE statements performed against a particular
Had a question on best approach with some security issues around on the fly
table creation by a user.
I want to users to create dynamic tables from the application. This means
that the user logged in should have create table privileges at the database
level. Assuming this is a security risk for
See the SECURITY DEFINER option for CREATE FUNCTION. This way you
don't have to give them create table privileges, but they can still
create a table through your function. You'll need to use EXECUTE to
create a table in pl/pgsql.
On May 27, 2007, at 4:50 PM, CAJ CAJ wrote:
Had a
Hi -
I too have encountered this issue. The work around that I created was to
have every table have a set of 3 cooresponding functions that know how to
1) create the table; 2) create triggers for the table; 3) create indexes
for the table. By doing so, I then am able to use a lazy
Hi,
Am Freitag, 23. Feb 2007, 07:10:06 + schrieb Richard Huxton:
Bertram Scharpf wrote:
it is very inconvenient for me that triggers aren't inherited:
Foreign keys too (which are a special type of trigger of course).
Is this behaviour to be implemented at any point of time in
the
Hi,
it is very inconvenient for me that triggers aren't inherited:
create table watch (
mod timestamp with time zone default '-infinity' not null
);
create function update_mod() returns trigger ...
create trigger update_mod before insert or update on watch
for each row
Bertram Scharpf wrote:
Hi,
it is very inconvenient for me that triggers aren't inherited:
Foreign keys too (which are a special type of trigger of course).
Is this behaviour to be implemented at any point of time in
the future? Could it be advisible to write the patch? Or is
it just too
I believe you should design it in a slightly different way:
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
gustavo halperin
Sent: donderdag 25 januari 2007 21:34
To: pgsql-general@postgresql.org
Subject: [GENERAL] triggers vs b-tree
Hello I have
Hello I have a design question:
I have a table representing Families, and a table representing Persons.
The table Family have a row family_id as primary key.
The table Person have a row person_id as primary key and contain also a
row family_id.
As you can understand, the row family_id in
Hello I have a design question:
I have a table representing Families, and a table representing Persons.
The table Family have a row family_id as primary key.
The table Person have a row person_id as primary key and contain also a
row family_id.
As you can understand, the row family_id in a
On Sun, Jan 21, 2007 at 09:05:30PM -0800, Alan Hodgson wrote:
On Sunday 21 January 2007 15:56, gustavo halperin [EMAIL PROTECTED] wrote:
I have another question about triggers, how can I pass arguments ?? I
read about some struct TriggerData *CurrentTriggerData, but I didn't
found any
On Monday 22 January 2007 07:04, Michael Fuhr [EMAIL PROTECTED] wrote:
You can pass literal string arguments to a trigger function. See
the CREATE TRIGGER documentation and, for PL/pgSQL, TG_ARGV and
TG_NARGS. For C see Writing Trigger Functions in C; search for
tgnargs and tgargs.
First, thank you for your answers about my problem with the function
'CREATE TRIGGER',
I have another question about triggers, how can I pass arguments ?? I
read about some struct TriggerData *CurrentTriggerData, but I didn't
found any explanation or example about how to use it in postgres SQL.
On Sunday 21 January 2007 15:56, gustavo halperin
[EMAIL PROTECTED] wrote:
First, thank you for your answers about my problem with the function
'CREATE TRIGGER',
I have another question about triggers, how can I pass arguments ?? I
read about some struct TriggerData *CurrentTriggerData, but I
Matthew Peter wrote:
Is it possible to access the entire sql query_string that called the trigger?
No. It doesn't necessarily exist in any useful form (think about what
happens with rules on a view, or triggers making updates which fire
other triggers - what is the original query?).
--
Is it possible to access the entire sql query_string that called the trigger?
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index
Dear All,
Can I check if OLD record is NULL in trigger function.
I'm using tg_op and check if it's UPDATE, etc. but I need check if OLD
record exists.
Is it possible?
f.i.
IF OLD IS NOT NULL THEN
IF OLD.identity IS NULL THEN
Hello, I have this doubt since I started using PostgreSQL, a few months ago.Why triggers are defined that way? I mean, in others DBMS you simply write:CREATE TRIGGER trigger_name ... bla bla bla
BEGIN END;Why you should write a function first and then the trigger, which must call that
Why you should write a function first and then the trigger, which must
call that function?
What are the advantages/disadvantages of that? Where can I find more
information?
The PG way seems very natural to me:
you can write functions that do something and then have many triggers
call that
Chris Mair [EMAIL PROTECTED] writes:
Why you should write a function first and then the trigger, which must
call that function?
... there's not just PL/PGSQL: you might want
to define a function in C or Perl and then have a trigger call it.
Right, that's the real reason: this approach
Hi,
Conventionally a trigger would fire a few sql queries on a particular event and we have standard code for that.
My requirement is to start a stored procedure or a C function as a trigger action.
Is this possible?
Thanks,
~Harpreet
# [EMAIL PROTECTED] / 2006-08-16 11:55:39 -0400:
Hi,
Conventionally a trigger would fire a few sql queries on a particular event
and we have standard code for that.
My requirement is to start a stored procedure or a C function as a trigger
action.
Is this possible?
Besides the fact
# [EMAIL PROTECTED] / 2006-07-31 11:58:49 -0400:
Actually Postgres manual of triggers says that in postgres, you can't write
a trigger in conventional sql. You have to write it in a procedural language
like C. So wanted some more insight on it.
~Jas
Where does it say so? Do you have a
http://www.postgresql.org/docs/8.1/interactive/triggers.html
it says something like this:
It is not currently possible to write a trigger function in the plain SQL function language.
though lately I saw triggers written in pure sql in postgres
~jas
On 8/1/06, Roman Neuhauser [EMAIL
1 - 100 of 202 matches
Mail list logo