aggregate functions only for numbers?
aggregate functions only for numbers?
От:
David Eduardo Gomez Noguera <davidgn@servidor.unam.mx>
Дата:
Hello I was making a reay dumb database. just to play. Its an agenda. I set 2 tables thus far, one for people with unique attribs to each people (birth, address and the like) and one for phones, since some people have more than one, or cell phones, etc. I wanted to make a query of name,birth date and phones, and have them grouped by name (so the name appeared only once) to get something like somebody |xxx-yyyy| mm-dd-yyyy |xxx-yyyy| somebody |xxx-yyyy| mm-dd-yyyy else | | But i guess its not possible right now? I did install the headers too, so i was just wondering if i could write an aggregate function to concatenate any type. In the docs, its not listed, and there are only aggregate functions that opperate on numbers. If you can point me as to where to start looking to do some coding server side on it, i would appreciate that. -- ICQ: 15605359 Bicho =^..^= First, they ignore you. Then they laugh at you. Then they fight you. Then you win. Mahatma Gandhi. ........Por que no pensaran los hombres como los animales? Pink Panther........ -------------------------------気検体の一致------------------------------------ 暑さ寒さも彼岸まで。 アン アン アン とっても大好き
Re: aggregate functions only for numbers?
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
David Eduardo Gomez Noguera writes: > I wanted to make a query of name,birth date and phones, and have them > grouped by name (so the name appeared only once) to get something like You could probably do what you want with a custom aggregate. This is discussed in the mail list archives, and I think there is an article about it on techdocs.postgresql.org. regards, tom lane