Gregory Stark <[EMAIL PROTECTED]> writes: > Here's something else which confused me just now. Why does the second query > return NULL instead of an array slice?
Because it isn't a slice expression --- you used colon nowhere, so the result type is going to be text not text[]. (Remember that the parser must determine the expression's result type at parse time, so whether there are enough subscripts can't enter into this.) Our alternatives here are to throw a subscripting error or return NULL. I'd personally have gone with throwing an error, I think, but it seems far too late to revisit that decision. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org