On Tue, Mar 22, 2005 at 09:04:42PM -0600, Tony Caduto wrote:
> 
> CREATE OR REPLACE FUNCTION mytest();
> RETURNS VOID as
> $$
> DECLARE
> mytestvar varchar;
> mytestvar2 integer;
> BEGIN
>          mytestvarr = 'bla';
>          select testfield from nonexistanttable where testfield = 2 
> INTO mytestvar2;
>          --The table does not exits, yet postgresql does not complain.
> END;
> $$
> LANGUAGE 'plpgsql' VOLATILE;

This is at most a warning. Just because the table doesn't exist now
doesn't mean it won't exixt when the function is run. Need to be
careful here otherwise when restoring a dump you'll end up with lots of
useless errors because the tables were created after the functions...

Hope this helps,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: pgpdlMdFbubup.pgp
Description: PGP signature

Reply via email to