From: | Matt Iskra <Matt(dot)Iskra(at)doj(dot)ca(dot)gov> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Cc: | mike(at)fuhr(dot)org, "John DeSoi <desoi"(at)pgedit(dot)com |
Subject: | Re: Trigger and Trigger function, Part 3 - success! |
Date: | 2005-06-20 17:15:44 |
Message-ID: | s2b69761.003@gwia |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
>>> Michael Fuhr <mike(at)fuhr(dot)org> 06/17/05 12:34 PM >>>
On Fri, Jun 17, 2005 at 03:05:23PM -0400, John DeSoi wrote:
> On Jun 17, 2005, at 1:32 PM, Matt Iskra wrote:
>
> >Thanks Mr. Fuhr, I used the psql and it worked. The pgAdmin tool must
> >have been having trouble with my schema qualified SQL code. The
> >trigger and trigger function work properly now.
>
> I don't think there is any problem with schema qualified code in
> pgAdmin3. At least, I tried your function on the Mac version and did
> not have any problems.
Agreed that that would be strange, especially since creating a
schema-qualified table apparently succeeded. Matt, if you retype
the code in pgAdmin III, does it work? As John mentions, you might
have had a special character in there someplace. We're narrowing
down on the problem but let's not draw conclusions prematurely.
Also, please don't keep changing the subject header -- that can
mess up views of message threads. Threads are usually easier to
follow if all the messages have the same subject.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
==================
Sorry about the subject header.
I typed the trigger function exactly like before, I double-checked the code format for hidden code (its ANSI and CR/LF format), opened it with different editor (no weird char), and even put my editor into hex mode - nothing. I ran it using the pgAdmin SQL tool - error right at the function name - the second line in the code below. I run it on the psql command line and it works. Here is the source code again.
CREATE FUNCTION
oc.upd_last_touch_test()
RETURNS trigger AS
$BODY$
BEGIN
NEW.last_touch := current_timestamp;
RETURN NEW;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
I am, quite frankly, stumped. However this is not too important as I was able to create the triggers and get the test database up and running so the programmers can continue. I just file this sort of fact in my head, along with other database peculiarities. Oracle, Informix and SQL Server have plenty of weirdness so I just keep copious notes.
--Matthew
CONFIDENTIALITY NOTICE: This communication with its contents may contain
confidential and/or legally privileged information. It is solely for the
use of the intended recipient(s). Unauthorized interception, review, use
or disclosure is prohibited and may violate applicable laws including
the Electronic Communications Privacy Act. If you are not the intended
recipient, please contact the sender and destroy all copies of the
communication.
From | Date | Subject | |
---|---|---|---|
Next Message | Keith Worthington | 2005-06-20 18:29:23 | Re: Trigger and Trigger function, Part 3 - success! |
Previous Message | operationsengineer1 | 2005-06-20 16:00:19 | Re: Data Migration from Access to Postgresql |