pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Problem w/trigger
3+ messages / 2 participants
[nested] [flat]

* Re: Problem w/trigger
@ 2002-09-16 21:32  Jose Avalis <javalis@sympatico.ca>
  parent: Pat Marchant <pat@btree.net>
  1 sibling, 0 replies; 3+ messages in thread

From: Jose Avalis @ 2002-09-16 21:32 UTC (permalink / raw)
  To: pgsql-odbc

Hi guys, how're you???

  Sorry, my neame is Jose Avalis fro m Toronto Canada, I'm sending this mail
because I have no idea what's going on!!!!!

  I've tried to register in your mail list last Friday, but I couldn't.
Since then, I've been receiving mails from different people asking for
features and ODBC Problems and I have no idea about that!!!!

  I'm just informing you guys about this situation because this people are
probably asking ofr help and I can't help them; actualy I need a help too.

  So check the list and exclude my address from there because I can't help
you; I don't know anything about Pastgres I'm just learning.

Take care.

Regards.

JOSE



----- Original Message -----
From: "Pat Marchant" <pat@btree.net>
To: <pgsql-odbc@postgresql.org>
Sent: Monday, September 16, 2002 7:01 PM
Subject: [ODBC] Problem w/trigger


> I have several tables that use a trigger to automatically
> update a timestamp field when a record is modified. The trigger
> works fine using psql. When I connect using ODBC, a
> modified record is always updated with the time that I
> connected to the server - not the current time.
>
> For example, if I connect to the database at
> '2002-09-16 13:45:16-07' every record I change will have this
> timestamp. I know the trigger is executing because if I modify
> the record from the server console the record will have the
> current time in the timestamp field - then if I change it
> again from ODBC it will revert back to the old timestamp.
>
> What's going on?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster




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

* Problem w/trigger
@ 2002-09-16 22:01  Pat Marchant <pat@btree.net>
  0 siblings, 2 replies; 3+ messages in thread

From: Pat Marchant @ 2002-09-16 22:01 UTC (permalink / raw)
  To: pgsql-odbc

I have several tables that use a trigger to automatically 
update a timestamp field when a record is modified. The trigger 
works fine using psql. When I connect using ODBC, a
modified record is always updated with the time that I
connected to the server - not the current time.

For example, if I connect to the database at
'2002-09-16 13:45:16-07' every record I change will have this 
timestamp. I know the trigger is executing because if I modify 
the record from the server console the record will have the
current time in the timestamp field - then if I change it
again from ODBC it will revert back to the old timestamp.

What's going on?




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

* Re: Problem w/trigger
@ 2002-09-17 16:11  Pat Marchant <pat@btree.net>
  parent: Pat Marchant <pat@btree.net>
  1 sibling, 0 replies; 3+ messages in thread

From: Pat Marchant @ 2002-09-17 16:11 UTC (permalink / raw)
  To: pgsql-odbc

Solved my own problem. The function the trigger was calling
was using 'now'::datetime to get the timestamp. I changed
that to CURRENT_TIMESTAMP and it worked.

I don't know why it was working in psql by not in ODBC.
Something to do with the function being cached?

On Mon, Sep 16, 2002 at 03:01:14PM -0700, Pat Marchant wrote:
> I have several tables that use a trigger to automatically 
> update a timestamp field when a record is modified. The trigger 
> works fine using psql. When I connect using ODBC, a
> modified record is always updated with the time that I
> connected to the server - not the current time.
> 
> For example, if I connect to the database at
> '2002-09-16 13:45:16-07' every record I change will have this 
> timestamp. I know the trigger is executing because if I modify 
> the record from the server console the record will have the
> current time in the timestamp field - then if I change it
> again from ODBC it will revert back to the old timestamp.
> 
> What's going on?



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


end of thread, other threads:[~2002-09-17 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-16 22:01 Problem w/trigger Pat Marchant <pat@btree.net>
2002-09-16 21:32 ` Jose Avalis <javalis@sympatico.ca>
2002-09-17 16:11 ` Pat Marchant <pat@btree.net>

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