Re: [SQL] Problem with return type of function ??? (corrected)

2009-10-24 Thread Denis BUCHER
Tom Lane a écrit : Denis BUCHER dbuche...@hsolutions.ch writes: To do this it will be a little complicated because of table dependencies... And it could bug again at the next DROP COLUMN... Is there a way to change my function (RETURN SETOF part) to specify the column names/types ? No, not

Re: [SQL] Problem with return type of function ??? (corrected)

2009-10-22 Thread Tom Lane
Denis BUCHER dbuche...@hsolutions.ch writes: I have a strange problem, because it worked in a fonction for a table, and now I created the same (?) function for another table and it doesn't work... The function is accepted but at runtime I get : ERREUR: wrong record type supplied in RETURN

Re: [SQL] Problem with return type of function ??? (corrected)

2009-10-22 Thread Denis BUCHER
Hello Tom, Tom Lane a écrit : Denis BUCHER dbuche...@hsolutions.ch writes: I have a strange problem, because it worked in a fonction for a table, and now I created the same (?) function for another table and it doesn't work... The function is accepted but at runtime I get : ERREUR:

Re: [SQL] Problem with return type of function ??? (corrected)

2009-10-22 Thread Richard Huxton
Tom Lane wrote: Denis BUCHER dbuche...@hsolutions.ch writes: Does that table have any dropped columns? If you don't remember whether you ever dropped any columns, a quick look into pg_attribute will tell you: select attname from pg_attribute where attrelid =

Re: [SQL] Problem with return type of function ??? (corrected)

2009-10-22 Thread Denis BUCHER
Hi Tom, Another question : Tom Lane a écrit : Denis BUCHER dbuche...@hsolutions.ch writes: I have a strange problem, because it worked in a fonction for a table, and now I created the same (?) function for another table and it doesn't work... The function is accepted but at runtime I get

Re: [SQL] Problem with return type of function ??? (corrected)

2009-10-22 Thread Tom Lane
Denis BUCHER dbuche...@hsolutions.ch writes: To do this it will be a little complicated because of table dependencies... And it could bug again at the next DROP COLUMN... Is there a way to change my function (RETURN SETOF part) to specify the column names/types ? No, not really. You could