Re: [HACKERS] CONVERT function is seriously broken
On Sat, 2 Nov 2002, Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: Unfortunately, I don't see any way offhand to fix this without an initdb :-(. Ooch, that hurts. How bad would it be if it was broken in 7.3? We could dike out the feature: convert_list: a_expr USING any_name { elog(ERROR, CONVERT(... USING ...) is not implemented); } Short of that, I think we need an initdb to change the function signature for the convert() function. It needs to take a (suitably quoted) text parameter, not an OID. Since we forced initdb only a week ago with beta3, I don't think there is really a strong argument against doing it again. But probably Marc will say that we need a beta4 at this point, instead of going for RC1... Most definitely ... but beta3 was nice and short, and no reason why beta4 can't be as well ... ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [HACKERS] CONVERT function is seriously broken
I have just noticed that the implementation of CONVERT(text USING encoding_name) tries to do database access during the grammar phase, viz it looks up the encoding_name in pg_conversion and replaces it with an OID. This is not workable; consider the situation where we are in an already-aborted transaction. Using a pg_conversion OID in stored rules isn't very acceptable either. Unfortunately, I don't see any way offhand to fix this without an initdb :-(. Sorry for the trouble and thanks for the fix. -- Tatsuo Ishii ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] CONVERT function is seriously broken
Tom Lane wrote: I have just noticed that the implementation of CONVERT(text USING encoding_name) tries to do database access during the grammar phase, viz it looks up the encoding_name in pg_conversion and replaces it with an OID. This is not workable; consider the situation where we are in an already-aborted transaction. Using a pg_conversion OID in stored rules isn't very acceptable either. Unfortunately, I don't see any way offhand to fix this without an initdb :-(. Ooch, that hurts. How bad would it be if it was broken in 7.3? -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] CONVERT function is seriously broken
Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: Unfortunately, I don't see any way offhand to fix this without an initdb :-(. Ooch, that hurts. How bad would it be if it was broken in 7.3? We could dike out the feature: convert_list: a_expr USING any_name { elog(ERROR, CONVERT(... USING ...) is not implemented); } Short of that, I think we need an initdb to change the function signature for the convert() function. It needs to take a (suitably quoted) text parameter, not an OID. Since we forced initdb only a week ago with beta3, I don't think there is really a strong argument against doing it again. But probably Marc will say that we need a beta4 at this point, instead of going for RC1... regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] CONVERT function is seriously broken
Tom Lane wrote: We could dike out the feature: convert_list: a_expr USING any_name { elog(ERROR, CONVERT(... USING ...) is not implemented); } Short of that, I think we need an initdb to change the function signature for the convert() function. It needs to take a (suitably quoted) text parameter, not an OID. Since we forced initdb only a week ago with beta3, I don't think there is really a strong argument against doing it again. But probably Marc will say that we need a beta4 at this point, instead of going for RC1... He certainly will. We can shoot out beta4 and make it sort. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly