On Wednesday 22 October 2003 06:55, Peter Eisentraut wrote: > Christopher Kings-Lynne writes: > > > Oh dear. We really need this function-specific schema path that the > > > SQL standard seems to talk about. > > > > What's that? How would it help? > > The idea is that you give each function its own schema search path at > creation time, and that path applies to that function for the rest of its > life. Then that function would be immune to schema path changes later on.
But surely that would mean I couldn't do: CREATE VIEW accts_schema.my_users AS SELECT * FROM all_users WHERE dept='ACCTS'; CREATE VIEW sales_schema.my_users AS SELECT * FROM all_users WHERE dept='SALES'; CREATE FUNCTION num_dept_users() RETURNS int4 AS ' SELECT count(*) FROM my_users; ' LANGUAGE SQL; If SELECT num_dept_users() gives a different result to SELECT count(*) FROM my_users that can't be desirable. -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]