Re: [GENERAL] Need help with a function from hell..

2006-10-04 Thread Chris Kratz
Hello Archie, We approach the problem slightly differently then others. Given an aggregate function comma_list which simply creates a comma seperated list, we use distinct to remove duplicates. test=# select comma_list(col) from test; comma_list a, b, a, c (1 row) test=#

[GENERAL] Need help with a function from hell..

2006-10-03 Thread arsi
Hi all, I have a small coding problem where my function is becoming, well, too ugly for comfort. I haven't finished it but you will get picture below. First a small description of the purpose. I have an aggregate function that takes a string and simply concatenates that string to the

Re: [GENERAL] Need help with a function from hell..

2006-10-03 Thread Erik Jones
Well, first off, this would be much easier in one of the other pl's such as for perl or ruby. Using plpgsql, I would suggest using more of the string function split_part since you know the delimiters the string can split on, using str_pos just to verify that there is say a '/' in a part of

Re: [GENERAL] Need help with a function from hell..

2006-10-03 Thread Andrew - Supernews
On 2006-10-03, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all, I have a small coding problem where my function is becoming, well, too ugly for comfort. I haven't finished it but you will get picture below. First a small description of the purpose. I have an aggregate function that