pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Is there any eqvivalent or alternative to UPDATE(column) or COLUMNS_UPDATED() of SQLServer2000
7+ messages / 3 participants
[nested] [flat]

* Is there any eqvivalent or alternative to UPDATE(column) or COLUMNS_UPDATED() of SQLServer2000
@ 2002-03-15 11:57  shreedhar <shreedhar@lucidindia.net>
  0 siblings, 1 reply; 7+ messages in thread

From: shreedhar @ 2002-03-15 11:57 UTC (permalink / raw)
  To: pgsql-admin

Is there any eqvivalent or alternative to the following IF UPDATE(column) or
IF(COLUMNS_UPDATED()) of SQLServer2000.

IF UPDATE (column)

Tests for an INSERT or UPDATE action to a specified column and is not used
with DELETE operations. More than one column can be specified. Because the
table name is specified in the ON clause, do not include the table name
before the column name in an IF UPDATE clause. To test for an INSERT or
UPDATE action for more than one column, specify a separate UPDATE(column)
clause following the first one. IF UPDATE will return the TRUE value in
INSERT actions because the columns have either explicit values or implicit
(NULL) values inserted.

IF (COLUMNS_UPDATED())

Tests, in an INSERT or UPDATE trigger only, whether the mentioned column or
columns were inserted or updated. COLUMNS_UPDATED returns a varbinary bit
pattern that indicates which columns in the table were inserted or updated.

Thanks And Regards,

Sreedhar





"Faith, faith, faith in ourselves, faith, faith in God, this is the secret
of greatness.
If you have faith in all the three hundred and thirty millions of your
mythological gods,
and in all the gods which foreigners have now and again introduced into your
midst,
and still have no faith in yourselves, there is no salvation for you. "
(III. 190)





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Is there any eqvivalent or alternative to UPDATE(column) or COLUMNS_UPDATED()
@ 2002-12-26 20:29  CoL <col@mportal.hu>
  parent: shreedhar <shreedhar@lucidindia.net>
  0 siblings, 1 reply; 7+ messages in thread

From: CoL @ 2002-12-26 20:29 UTC (permalink / raw)
  To: pgsql-admin

http://www.postgresql.org/idocs/index.php?trigger-manager.html
http://www.postgresql.org/idocs/index.php?plpgsql-trigger.html
TG_OP ?

C.

shreedhar wrote, On 12/26/2002 12:57 PM:
> Is there any eqvivalent or alternative to the following IF UPDATE(column) or
> IF(COLUMNS_UPDATED()) of SQLServer2000.
> 
> IF UPDATE (column)
> 
> Tests for an INSERT or UPDATE action to a specified column and is not used
> with DELETE operations. More than one column can be specified. Because the
> table name is specified in the ON clause, do not include the table name
> before the column name in an IF UPDATE clause. To test for an INSERT or
> UPDATE action for more than one column, specify a separate UPDATE(column)
> clause following the first one. IF UPDATE will return the TRUE value in
> INSERT actions because the columns have either explicit values or implicit
> (NULL) values inserted.
> 
> IF (COLUMNS_UPDATED())
> 
> Tests, in an INSERT or UPDATE trigger only, whether the mentioned column or
> columns were inserted or updated. COLUMNS_UPDATED returns a varbinary bit
> pattern that indicates which columns in the table were inserted or updated.
> 
> Thanks And Regards,
> 
> Sreedhar




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Is there any eqvivalent or alternative to UPDATE(column)or COLUMNS_UPDATED() of SQLServer2000
@ 2002-12-27 03:58  shreedhar <shreedhar@lucidindia.net>
  0 siblings, 0 replies; 7+ messages in thread

From: shreedhar @ 2002-12-27 03:58 UTC (permalink / raw)
  To: pgsql-admin; Bruce Momjian <pgman@candle.pha.pa.us>

Sorry,

Because it is some problem in my system. So, it has shown Fri, 15 Mar 2002
17:27:30 +0530.

Kindly any body give solution to my problem.

Sreedhar.
----- Original Message -----
From: "Bruce Momjian" <pgman@candle.pha.pa.us>
To: "shreedhar" <shreedhar@lucidindia.net>
Sent: Thursday, December 26, 2002 11:03 PM
Subject: Re: [ADMIN] Is there any eqvivalent or alternative to
UPDATE(column)or COLUMNS_UPDATED() of SQLServer2000


>
> Your email is dated:
>
> Date: Fri, 15 Mar 2002 17:27:30 +0530
>
> --------------------------------------------------------------------------
-
>
> shreedhar wrote:
> > Is there any eqvivalent or alternative to the following IF
UPDATE(column) or
> > IF(COLUMNS_UPDATED()) of SQLServer2000.
> >
> > IF UPDATE (column)
> >
> > Tests for an INSERT or UPDATE action to a specified column and is not
used
> > with DELETE operations. More than one column can be specified. Because
the
> > table name is specified in the ON clause, do not include the table name
> > before the column name in an IF UPDATE clause. To test for an INSERT or
> > UPDATE action for more than one column, specify a separate
UPDATE(column)
> > clause following the first one. IF UPDATE will return the TRUE value in
> > INSERT actions because the columns have either explicit values or
implicit
> > (NULL) values inserted.
> >
> > IF (COLUMNS_UPDATED())
> >
> > Tests, in an INSERT or UPDATE trigger only, whether the mentioned column
or
> > columns were inserted or updated. COLUMNS_UPDATED returns a varbinary
bit
> > pattern that indicates which columns in the table were inserted or
updated.
> >
> > Thanks And Regards,
> >
> > Sreedhar
> >
> >
> >
> >
> >
> > "Faith, faith, faith in ourselves, faith, faith in God, this is the
secret
> > of greatness.
> > If you have faith in all the three hundred and thirty millions of your
> > mythological gods,
> > and in all the gods which foreigners have now and again introduced into
your
> > midst,
> > and still have no faith in yourselves, there is no salvation for you. "
> > (III. 190)
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
> >
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania
19073
>




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Is there any eqvivalent or alternative to UPDATE(column)orCOLUMNS_UPDATED() of SQLServer2000
@ 2002-12-27 05:53  shreedhar <shreedhar@lucidindia.net>
  0 siblings, 1 reply; 7+ messages in thread

From: shreedhar @ 2002-12-27 05:53 UTC (permalink / raw)
  To: pgsql-admin; Bruce Momjian <pgman@candle.pha.pa.us>

Dear Momjian,

I need solution for the problem stated in subject. (i.e.) any method to know
whether a record is Previously updated  or not ?

Sreedhar
----- Original Message -----
From: "Bruce Momjian" <pgman@candle.pha.pa.us>
To: "shreedhar" <shreedhar@lucidindia.net>
Sent: Friday, December 27, 2002 10:41 AM
Subject: Re: [ADMIN] Is there any eqvivalent or alternative to
UPDATE(column)orCOLUMNS_UPDATED() of SQLServer2000


>
> Sure. As root, use the 'date' command to fix it.
>
> --------------------------------------------------------------------------
-
>
> shreedhar wrote:
> > Sorry,
> >
> > Because it is some problem in my system. So, it has shown Fri, 15 Mar
2002
> > 17:27:30 +0530.
> >
> > Kindly any body give solution to my problem.
> >
> > Sreedhar.
> > ----- Original Message -----
> > From: "Bruce Momjian" <pgman@candle.pha.pa.us>
> > To: "shreedhar" <shreedhar@lucidindia.net>
> > Sent: Thursday, December 26, 2002 11:03 PM
> > Subject: Re: [ADMIN] Is there any eqvivalent or alternative to
> > UPDATE(column)or COLUMNS_UPDATED() of SQLServer2000
> >
> >
> > >
> > > Your email is dated:
> > >
> > > Date: Fri, 15 Mar 2002 17:27:30 +0530
> > >
> >
> --------------------------------------------------------------------------
> > -
> > >
> > > shreedhar wrote:
> > > > Is there any eqvivalent or alternative to the following IF
> > UPDATE(column) or
> > > > IF(COLUMNS_UPDATED()) of SQLServer2000.
> > > >
> > > > IF UPDATE (column)
> > > >
> > > > Tests for an INSERT or UPDATE action to a specified column and is
not
> > used
> > > > with DELETE operations. More than one column can be specified.
Because
> > the
> > > > table name is specified in the ON clause, do not include the table
name
> > > > before the column name in an IF UPDATE clause. To test for an INSERT
or
> > > > UPDATE action for more than one column, specify a separate
> > UPDATE(column)
> > > > clause following the first one. IF UPDATE will return the TRUE value
in
> > > > INSERT actions because the columns have either explicit values or
> > implicit
> > > > (NULL) values inserted.
> > > >
> > > > IF (COLUMNS_UPDATED())
> > > >
> > > > Tests, in an INSERT or UPDATE trigger only, whether the mentioned
column
> > or
> > > > columns were inserted or updated. COLUMNS_UPDATED returns a
varbinary
> > bit
> > > > pattern that indicates which columns in the table were inserted or
> > updated.
> > > >
> > > > Thanks And Regards,
> > > >
> > > > Sreedhar
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "Faith, faith, faith in ourselves, faith, faith in God, this is the
> > secret
> > > > of greatness.
> > > > If you have faith in all the three hundred and thirty millions of
your
> > > > mythological gods,
> > > > and in all the gods which foreigners have now and again introduced
into
> > your
> > > > midst,
> > > > and still have no faith in yourselves, there is no salvation for
you. "
> > > > (III. 190)
> > > >
> > > >
> > > >
> > > > ---------------------------(end of
broadcast)---------------------------
> > > > TIP 5: Have you checked our extensive FAQ?
> > > >
> > > > http://www.postgresql.org/users-lounge/docs/faq.html
> > > >
> > >
> > > --
> > >   Bruce Momjian                        |  http://candle.pha.pa.us
> > >   pgman@candle.pha.pa.us               |  (610) 359-1001
> > >   +  If your life is a hard drive,     |  13 Roberts Road
> > >   +  Christ can be your backup.        |  Newtown Square, Pennsylvania
> > 19073
> > >
> >
> >
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania
19073
>




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Is there any eqvivalent or alternative to UPDATE(column)orCOLUMNS_UPDATED() of SQLServer2000
@ 2002-12-27 09:26  Klaus Sonnenleiter <klaus@sonnenleiter.com>
  parent: shreedhar <shreedhar@lucidindia.net>
  0 siblings, 0 replies; 7+ messages in thread

From: Klaus Sonnenleiter @ 2002-12-27 09:26 UTC (permalink / raw)
  To: shreedhar <shreedhar@lucidindia.net>; pgsql-admin; Bruce Momjian <pgman@candle.pha.pa.us>

Sreedhar,



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Is there any eqvivalent or alternative to UPDATE(column) or COLUMNS_UPDATED()
@ 2002-12-31 09:21  Klaus Sonnenleiter <klaus@sonnenleiter.com>
  parent: CoL <col@mportal.hu>
  0 siblings, 1 reply; 7+ messages in thread

From: Klaus Sonnenleiter @ 2002-12-31 09:21 UTC (permalink / raw)
  To: col@mportal.hu; pgsql-admin

I think the question was how to find out which columns were affected by the 
update statement. TG_OP will only tell you whether an update fired the 
trigger.

Klaus

On Thursday 26 December 2002 03:29, CoL wrote:
> http://www.postgresql.org/idocs/index.php?trigger-manager.html
> http://www.postgresql.org/idocs/index.php?plpgsql-trigger.html
> TG_OP ?
>
> C.
>
> shreedhar wrote, On 12/26/2002 12:57 PM:
> > Is there any eqvivalent or alternative to the following IF UPDATE(column)
> > or IF(COLUMNS_UPDATED()) of SQLServer2000.
> >
> > IF UPDATE (column)
> >
> > Tests for an INSERT or UPDATE action to a specified column and is not
> > used with DELETE operations. More than one column can be specified.
> > Because the table name is specified in the ON clause, do not include the
> > table name before the column name in an IF UPDATE clause. To test for an
> > INSERT or UPDATE action for more than one column, specify a separate
> > UPDATE(column) clause following the first one. IF UPDATE will return the
> > TRUE value in INSERT actions because the columns have either explicit
> > values or implicit (NULL) values inserted.
> >
> > IF (COLUMNS_UPDATED())
> >
> > Tests, in an INSERT or UPDATE trigger only, whether the mentioned column
> > or columns were inserted or updated. COLUMNS_UPDATED returns a varbinary
> > bit pattern that indicates which columns in the table were inserted or
> > updated.
> >
> > Thanks And Regards,
> >
> > Sreedhar
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Is there any eqvivalent or alternative to UPDATE(column) or COLUMNS_UPDATED()
@ 2002-12-31 19:52  CoL <col@mportal.hu>
  parent: Klaus Sonnenleiter <klaus@sonnenleiter.com>
  0 siblings, 0 replies; 7+ messages in thread

From: CoL @ 2002-12-31 19:52 UTC (permalink / raw)
  To: pgsql-admin

Yes, i know, I just write, that these are the possibilities. Or are 
there any else?

C.

Klaus Sonnenleiter wrote, On 12/31/2002 3:25 PM:
> I think the question was how to find out which columns were affected by the 
> update statement. TG_OP will only tell you whether an update fired the 
> trigger.
> 
> Klaus
> 
> On Thursday 26 December 2002 03:29, CoL wrote:
>> http://www.postgresql.org/idocs/index.php?trigger-manager.html
>> http://www.postgresql.org/idocs/index.php?plpgsql-trigger.html
>> TG_OP ?
>>
>> C.
>>
>> shreedhar wrote, On 12/26/2002 12:57 PM:
>> > Is there any eqvivalent or alternative to the following IF UPDATE(column)
>> > or IF(COLUMNS_UPDATED()) of SQLServer2000.
>> >
>> > IF UPDATE (column)
>> >
>> > Tests for an INSERT or UPDATE action to a specified column and is not
>> > used with DELETE operations. More than one column can be specified.
>> > Because the table name is specified in the ON clause, do not include the
>> > table name before the column name in an IF UPDATE clause. To test for an
>> > INSERT or UPDATE action for more than one column, specify a separate
>> > UPDATE(column) clause following the first one. IF UPDATE will return the
>> > TRUE value in INSERT actions because the columns have either explicit
>> > values or implicit (NULL) values inserted.
>> >
>> > IF (COLUMNS_UPDATED())
>> >
>> > Tests, in an INSERT or UPDATE trigger only, whether the mentioned column
>> > or columns were inserted or updated. COLUMNS_UPDATED returns a varbinary
>> > bit pattern that indicates which columns in the table were inserted or
>> > updated.
>> >
>> > Thanks And Regards,
>> >
>> > Sreedhar
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 3: if posting/reading through Usenet, please send an appropriate
>> subscribe-nomail command to majordomo@postgresql.org so that your
>> message can get through to the mailing list cleanly
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster




^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2002-12-31 19:52 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-03-15 11:57 Is there any eqvivalent or alternative to UPDATE(column) or COLUMNS_UPDATED() of SQLServer2000 shreedhar <shreedhar@lucidindia.net>
2002-12-26 20:29 ` Re: Is there any eqvivalent or alternative to UPDATE(column) or COLUMNS_UPDATED() CoL <col@mportal.hu>
2002-12-31 09:21   ` Re: Is there any eqvivalent or alternative to UPDATE(column) or COLUMNS_UPDATED() Klaus Sonnenleiter <klaus@sonnenleiter.com>
2002-12-31 19:52     ` Re: Is there any eqvivalent or alternative to UPDATE(column) or COLUMNS_UPDATED() CoL <col@mportal.hu>
2002-12-27 03:58 Re: Is there any eqvivalent or alternative to UPDATE(column)or COLUMNS_UPDATED() of SQLServer2000 shreedhar <shreedhar@lucidindia.net>
2002-12-27 05:53 Re: Is there any eqvivalent or alternative to UPDATE(column)orCOLUMNS_UPDATED() of SQLServer2000 shreedhar <shreedhar@lucidindia.net>
2002-12-27 09:26 ` Re: Is there any eqvivalent or alternative to UPDATE(column)orCOLUMNS_UPDATED() of SQLServer2000 Klaus Sonnenleiter <klaus@sonnenleiter.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox