From: PFC <lists@boutiquenumerique.com>
To: NosyMan <nosyman@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: How to iterate through arrays?
Date: Wed, 09 Feb 2005 15:16:33 +0100
Message-ID: <opslxolvodth1vuj@musicbox> (raw)
In-Reply-To: <200502091559.08997.nosyman@gmail.com>
References: <200502091559.08997.nosyman@gmail.com>
- use TEXT instead of CHAR (what is CHAR without (n) ?)
- inintialize your array with '{}' because it is created as NULL if you
just declare it without setting it to an empty array.
> Hi there,
>
> I'm trying to iterate through arrays in PL/PGSQL:
> ....
> DECLARE
> update_query CHAR;
> update_query_params CHAR ARRAY[6];
> BEGIN
> update_query_params[1]:='some text';
>
> RAISE NOTICE 'Testing element %', update_query_params[1];
> END
> .....
>
>
> It does not 'compile'... :-(. Can you tell me what is the problem?
>
> Thanks,
> Nosy
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lists@boutiquenumerique.com, nosyman@gmail.com
Subject: Re: How to iterate through arrays?
In-Reply-To: <opslxolvodth1vuj@musicbox>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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