Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtain RAISE NOTICE message #144

Closed
lelit opened this issue May 23, 2017 · 4 comments
Closed

Obtain RAISE NOTICE message #144

lelit opened this issue May 23, 2017 · 4 comments

Comments

@lelit
Copy link
Contributor

lelit commented May 23, 2017

Is there any way to get the messages emitted by a RAISE NOTICE statement?

@amsb
Copy link

amsb commented May 23, 2017

I don't think so, but if you RAISE WARNING or higher (by default), you can catch the exception that will be thrown. The error message is structured so you can pick out its parts from the exception object.

@elprans
Copy link
Member

elprans commented May 23, 2017

I don't think we currently handle NoticeResponse messages. Those can be async, so we'll likely need a new API similar to add_listener.

@lelit
Copy link
Contributor Author

lelit commented May 23, 2017

Reading the source I found a single reference to NoticeResponse and indeed it seem discarding any content, but I wasn't sure.
Thank you!

vitaly-burovoy added a commit to vitaly-burovoy/asyncpg that referenced this issue May 26, 2017
vitaly-burovoy added a commit to vitaly-burovoy/asyncpg that referenced this issue May 26, 2017
vitaly-burovoy added a commit to vitaly-burovoy/asyncpg that referenced this issue Jul 5, 2017
vitaly-burovoy added a commit to vitaly-burovoy/asyncpg that referenced this issue Jul 5, 2017
1st1 pushed a commit that referenced this issue Jul 5, 2017
@elprans
Copy link
Member

elprans commented Jul 6, 2017

Fixed in #147 and #167.

@elprans elprans closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants