On Thu, Dec 29, 2005 at 01:23:28PM -0500, Ken Winter wrote:
> That works. (Odd that the initialization seems to be necessary to make it
> work.) Thanks! Yes, I'm using version 7.4.
7.4.what? Absence of initialization shouldn't cause a syntax error;
at least it doesn't in 7.4.10. However, in 7
"Ken Winter" <[EMAIL PROTECTED]> writes:
> That works. (Odd that the initialization seems to be necessary to make it
> work.) Thanks! Yes, I'm using version 7.4.
Possibly what you're running into is that 7.4 is restrictive about what
you can do with an array that's NULL. Until pretty recently,
: Ken Winter
> Cc: PostgreSQL pg-sql list
> Subject: Re: [SQL] Arrays in PL/pgSQL routines?
>
> Ken Winter wrote:
> > Can arrays be declared in PL/pgSQL routines? If so, how?
> >
>
> > DECLARE
> >
> try:
> my_array VARCHAR[] := '{}';
>
> no
On Thu, Dec 29, 2005 at 12:46:28PM -0500, Ken Winter wrote:
> Can arrays be declared in PL/pgSQL routines? If so, how?
>
> Section 8.10 of the documentation
> (http://www.postgresql.org/docs/7.4/static/arrays.html) tells how to declare
> and use arrays as table columns. But I don't find any part
Ken Winter wrote:
Can arrays be declared in PL/pgSQL routines? If so, how?
DECLARE
try:
my_array VARCHAR[] := '{}';
not sure if this works in 7.4 though, if that's the version that you are
using.
---(end of broadcast)---
TIP 9: In versio
Can arrays be declared in PL/pgSQL routines? If so,
how?
Section 8.10 of the documentation (http://www.postgresql.org/docs/7.4/static/arrays.html)
tells how to declare and use arrays as table columns. But I don’t
find any part of the documentation that says how to declare a simple arr
Michael Shapiro <[EMAIL PROTECTED]> writes:
> I have tried the following (which doesn't work)
> dn[1] := \'a\';
> The parser doesn't like the [ that follows dn.
I believe Joe Conway fixed this in 7.4. Note that you also need to
initialize the array to something, because assigning to an elem
Is it possible in pl/pgsql to declare and then assign to arrays?
For example if I declare an array as follows
DECLARE
dn text[];
How do I assign the first element to a string (say 'a').
I have tried the following (which doesn't work)
dn[1] := \'a\';
The parser do