Re: [HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Markus Bertheau
t; Just assign the value to a text variable and then use quote_literal. Isn't that a workaround? Or is that the way such things are done in plpgsql? Markus -- Markus Bertheau ☭ <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 9: the p

Re: [HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Markus Bertheau
presentation of a bytea value and it looks like I'm going to have to write a C function for that. Markus -- Markus Bertheau ☭ <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropria

[HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Markus Bertheau
olean (), quote_date() and so on. For the sake of completeness I think these functions should exist. While the use of to_char() resp. decode() for some types is possible, it does feel like a workaround to me. Opinions? Do these functions belong in the PostgreSQL core? -- Markus Bertheau ☭ <[EMAIL P

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[]

2005-06-06 Thread Markus Bertheau
an 0. I don't know why it was decided to do that in the first place. It seems a rather odd feature to me. Markus -- Markus Bertheau ☭ <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send a

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-06 Thread Markus Bertheau
considered '{}' to > denote a zero-dimensional array. But array_upper(ARRAY(SELECT 1 WHERE FALSE), 1) should return 0, and array_upper(ARRAY[], 1), when the ARRAY[] syntax is supported, should return 0. Do I get that right? Markus -- Markus Bertheau ☭ <[E

Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-06-06 Thread Markus Bertheau
ype matching > that of the subquery's output column. > > To me, that implies that a subquery result of no rows generates a > one-dimensional array of no elements, not a null array. By analogy, array_upper('{}'::TEXT[], 1) should return 0 instead of N