extern class `{int`}
new `{ return PGRES_EMPTY_QUERY; `}
new `{ return PGRES_COMMAND_OK; `}
new `{ return PGRES_TUPLES_OK; `}
new `{ return PGRES_COPY_OUT; `}
new `{ return PGRES_COPY_IN; `}
new `{ return PGRES_BAD_RESPONSE; `}
new `{ return PGRES_NONFATAL_ERROR; `}
new `{ return PGRES_FATAL_ERROR; `}
fun : Bool `{
return !(self == PGRES_BAD_RESPONSE || self == PGRES_NONFATAL_ERROR || self == PGRES_FATAL_ERROR);
`}
redef fun to_s import CString.to_s `{
char * err = PQresStatus(self);
if(err == NULL) err = "";
return CString_to_s(err);
`}
end
lib/postgresql/native_postgres.nit:24,1--43,3