"Day, David" <dday@xxxxxxxxxx> writes: > Looking at the outermost for loop of the function below, If I run this CTE query from the psql command line > I am returned what I expect for values for translator_id and the > Aggregating MIN functions. I restore the experimental data and now run the function. > In the context of this function I get a valid translator_id , > But the MINed columns are NULL ???? Perhaps those column names duplicate variable names within the function, and what's being returned is the values of the variables? If you think there's a bug here, you'd need to provide a self-contained test case. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general