Is there anyway way to get the following to work?
table foo
id | name1 | name2
---+---------+------
0 | Abe | NULL
1 | William | Bill
create function prefname(text, text)
returns text as'
declare
begin
end;'
language 'plpgsql';
select id, name1, name2, prefname(name1, name2) as pref from foo;
I wind up with
id | name1 | name2 | prefname
---+---------+-------+-----------
0 | Abe | NULL | NULL
1 | William | Bill | Bill
instead of
id | name1 | name2 | prefname
---+---------+-------+-----------
0 | Abe | NULL | Abe
1 | William | Bill | Bill
-
- Thomas Swan
- Graduate Student - Computer Science
- The University of Mississippi
-
- "People can be categorized into two fundamental
- groups, those that divide people into two groups
- and those that don't."