| From: | Jeff Davis <pgsql(at)j-davis(dot)com> | 
|---|---|
| To: | Thomas Kellerer <spam_eater(at)gmx(dot)net> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Using unnest | 
| Date: | 2009-07-25 21:14:52 | 
| Message-ID: | 1248556492.6158.313.camel@jdavis | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Sat, 2009-07-25 at 22:54 +0200, Thomas Kellerer wrote:
> Do I understand this correctly that by casting it first to text, I effectively create a new array 
> the same way I create one, when I supply a literal like '{1,2,3}'::text[]
Similar, but not quite the same. '{1,2,3}'::text[] is actually
constructing from the cstring type using the type input function.
Cstring is not a normal type, it is what things are before they have a
normal type.
So, my strategy will only work if the array type you're trying to cast
to has a cast from text.
There aren't separate input functions for each array type, so it's hard
to make this work without depending on a cast from text. Perhaps someone
else has a better idea, though.
Regards,
	Jeff Davis
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2009-07-25 21:47:30 | Re: where is pg_resetxlog ? | 
| Previous Message | Daniel Verite | 2009-07-25 21:13:11 | Re: where is pg_resetxlog ? |