Function error
Function error
От:
"Adam H. Pendleton" <apendleton@vgsinc.com>
Дата:
I created the following function: create function employee_pay_update() returns opaque as 'begin insert into employee_payroll values ( new.employee_id, new.employee_name );' language 'plpgsql'; This is just supposed to insert any record inserted into a table into employee_payroll. I don't need any sort of error checking as that will be done elsewhere. When I try to insert into the first table, and the trigger calls this function I get this error: java.sql.SQLException: ERROR: fmgr_info: function 19265: cache lookup failed Did I forget to do something? Adam ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Si hoc legere scis nimium eruditionis habes.
Proper syntax of WHERE (select...)?
От:
"Justin Long" <justinlong@strategicnetwork.org>
Дата:
I am attempting to generate a random select from a database. Here's basically what I'm trying to do: 1. select the qualified segments from a databaes (the query is... where moderator>'' and leadin>'') 2. from this selection, select 3 random segments. I had thought that select id,name,leadin from country whereoidrand(oid,3) in (select id,name,leadin from country where moderator>'' and leadin>''); would work, but it definitely doesn't. I've been hacking around on this for a while and can't seem to find a solution. I can get the system to select a random number from the database, but not a random number of qualified results. Any suggestions from anyone? Never retreat. Never surrender. Never cut a deal with a dragon. _______________________________________________________________ Justin Long Executive Producer 616 Station Square Ct http://www.strategicnetwork.org Chesapeake, VA 23320 Network for Strategic Missions JustinLong@strategicnetwork.org 977 Centerville Trnpk CSB 317 757-226-5011 Va Beach, VA 23463, USA