Skip site navigation (1) Skip section navigation (2)

Re: Notices during execution

From: Oswaldo <listas(at)soft-com(dot)es>
To: psycopg(at)postgresql(dot)org
Subject: Re: Notices during execution
Date: 2011-09-17 11:25:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: psycopg
El 16/09/2011 21:05, Jason McKellar escribió:
> Hello,
> Is there a way to get messages output using raise notice while a
> function is executing?
> I have a long-running (10 minutes) function that raises notices every 10
> seconds or so about what it is currently doing and would like to view
> them while the function is running. I suppose a workaround if I can't do
> this in Psycopg2 is to execute psql and get the stdout.

The connection object has a 'notices' property, see:

Note that if you use synchronous mode you can't check the messages ultil 
the query has finished. I don't know if using threads the notices can be 
readed while que query is in execution.



In response to

psycopg by date

Next:From: Nicklas BörjessonDate: 2011-09-25 21:25:16
Subject: Problems with Python 3.2.
Previous:From: Jason McKellarDate: 2011-09-16 19:05:57
Subject: Notices during execution

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group