Skip site navigation (1) Skip section navigation (2)

Fwd: Array Question

From: Terry Lee Tucker <terry(at)esc1(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Fwd: Array Question
Date: 2004-10-30 01:25:52
Message-ID: 200410292125.52459.terry@esc1.com (view raw or flat)
Thread:
Lists: 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(at)esc1(dot)com>
To: pgsql-novice(at)postgresql(dot)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(at)esc1(dot)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(at)esc1(dot)com

pgsql-novice by date

Next:From: Tom LaneDate: 2004-10-30 02:07:03
Subject: Re: Array Question
Previous:From: Terry Lee TuckerDate: 2004-10-30 01:08:38
Subject: Array Question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group