Search Postgresql Archives

Re: Intentionally produce Errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In PL/pgSQL you could use the RAISE command:
http://www.postgresql.org/docs/8.1/interactive/plpgsql-errors-and-messages.h
tml

Best regards,
Matthias

> -----Original Message-----
> 
> Hi,
> 
> this is sort of a silly question, but: what's the proper way to 
> intentionally generate an error? I'm writing tests for 
> pyPgSQL and want 
> to check it's error handling. Currently, I'm using:
> 
> SELECT "THIS PRODUCES AN SQL ERROR";
> 
> Is there any better way to generate errors? Probably even generating 
> specific errors given?
> 
> Regards
> 
> Markus
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
> 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux