Fwd: Array Question - Mailing list pgsql-novice

From Terry Lee Tucker
Subject Fwd: Array Question
Date
Msg-id 200410292125.52459.terry@esc1.com
Whole thread Raw
List pgsql-novice
Correction:

That should read: new.array[x] = <some_value>;

----------  Forwarded Message  ----------

Subject: [NOVICE] Array Question
Date: Friday 29 October 2004 09:08 pm
From: Terry Lee Tucker <terry@esc1.com>
To: pgsql-novice@postgresql.org

Greetings:

I have a customer history table that contains several integer and decimal
arrays for recording sales and load count information for each of the 12
months. I'm trying to modify one of the arrays in a pre-update trigger. I'm
looping as in:

for x in 1..12 loop
    array[x] = <some_value>;
    .
    .
    .
end loop;

This will not compile. I get the following error:

ERROR:  syntax error at or near "["

If I comment that line out, all works well. Any ideas?

Thanks...

--
Quote: 73
"Inasmuch as these people draw near with their mouths
 And honor Me with their lips,
 But have removed their hearts far from Me,
 And their fear toward Me is taught by the commandment of men..."

 -- Isiah 29:13

 Work: 1-336-372-6812
 Cell: 1-336-363-4719
email: terry@esc1.com

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

-------------------------------------------------------

--
Quote: 79
"Sometimes when I'm faced with an unbeliever, an atheist, I am
 tempted to invite him to the greatest gourmet dinner that one could
 ever serve, and when we finished eating that magnificent dinner, to
 ask him if he believes there's a cook."

 --Ronald Reagan

 Work: 1-336-372-6812
 Cell: 1-336-363-4719
email: terry@esc1.com

pgsql-novice by date:

Previous
From: Terry Lee Tucker
Date:
Subject: Array Question
Next
From: Tom Lane
Date:
Subject: Re: Array Question