From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: malformed array literal in 8beta1 |
Date: | 2004-08-29 22:21:02 |
Message-ID: | 87y8jxio1d.fsf@stark.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Chris" <chris(at)paymentonline(dot)com> writes:
> After looking closer at the logs, what seems to be happening is that it
> doesn't like the empty array values. All functions that I call with an array
> that have one or more empty elements are returning this error. Should I be
> setting the value to NULL instead of just leaving it empty?
You can't store null values in arrays (yet).
Assuming your arrays are text[] or varchar[] you can store the empty string
represented by "" though. You might find it safest to put "" around all your
parameters and quote "s inside them.
Or better yet (imho) is to use the new array[...] constructor. That you can do
using the existing quoting functions without worrying about someone sneaking a
double quote inside your values. They also play nicer with placeholders.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Hervé Piedvache | 2004-08-29 22:50:46 | Re: [webmaster] RSS Feeds are dead on Web site |
Previous Message | Dave Page | 2004-08-29 22:09:20 | Re: [webmaster] RSS Feeds are dead on Web site |