Re: Question about function body checking and 8.1
Вложения
В списке pgsql-general по дате отправления:
| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Question about function body checking and 8.1 |
| Дата | |
| Msg-id | 20050323210212.GB3962@svana.org обсуждение исходный текст |
| Ответ на | Re: Question about function body checking and 8.1 (Tony Caduto <tony_caduto@amsoftwaredesign.com>) |
| Список | pgsql-general |
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.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера