Read messages from the socket in loop until:
1). if finishOnError is set and ErrorResponse is received, function
throws PsqlErrorResponseException immediately.
2). ReadyForQuery message is received.
3). interceptor delegate returns true.
4). NotificationResponse received and notificationCallback returned 'true'.
Interceptor delegate is used to customize the logic. If the message is
not ReadyForQuery, ErrorResponse or Notice\Notification, it is passed to
interceptor.
Read messages from the socket in loop until: 1). if finishOnError is set and ErrorResponse is received, function throws PsqlErrorResponseException immediately. 2). ReadyForQuery message is received. 3). interceptor delegate returns true. 4). NotificationResponse received and notificationCallback returned 'true'. Interceptor delegate is used to customize the logic. If the message is not ReadyForQuery, ErrorResponse or Notice\Notification, it is passed to interceptor.