On Tuesday 24 February 2004 16:29, sferriol wrote: > hello > is it possible with postgres 7.2 or more, to define a dynamic view. > For example, i have a table with a column 'user' > and i want to define a view which gives infomrations from different > tables but the user has to specifie the 'user' parameter when using a > select to the view
You can have a view something like: SELECT * FROM personal_info WHERE owner = CURRENT_USER; There are some other vars/functions too SESSION_USER and current_database() etc. -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster