Re: [GENERAL] How to print application_name in log_line_prefix (using %a)?

2012-10-28 Thread Tianyin Xu
Got it! Thanks, Chris! I still wonder why application_name appears in the configuration file if it cannot take effort :-P T On Sun, Oct 28, 2012 at 11:29 PM, Chris Angelico wrote: > On Mon, Oct 29, 2012 at 5:22 PM, Tianyin Xu wrote: > > Thanks a lot, Chris! > > > > Yes, the manual said that

Re: [GENERAL] How to print application_name in log_line_prefix (using %a)?

2012-10-28 Thread Chris Angelico
On Mon, Oct 29, 2012 at 5:22 PM, Tianyin Xu wrote: > Thanks a lot, Chris! > > Yes, the manual said that "It is typically set by an application upon > connection to the server." exactly your approach. > > But the examples you gave me is to print the application_name in the query > results, aren't t

Re: [GENERAL] How to print application_name in log_line_prefix (using %a)?

2012-10-28 Thread Tianyin Xu
Thanks a lot, Chris! Yes, the manual said that "It is typically set by an application upon connection to the server." exactly your approach. But the examples you gave me is to print the application_name in the query results, aren't they? Do you know how to make it as the prefix of the local log m

[GENERAL] Why PGDLLIMPORT is needed

2012-10-28 Thread 高健
On /src/include/storage/proc.h: I saw the following line: extern PGDLLIMPORT PGPROC *MyProc; I want to know why PGDLLIMPORT is used here? Does it mean: exten PGPROC *MyProc; right?

Re: [GENERAL] How to print application_name in log_line_prefix (using %a)?

2012-10-28 Thread Chris Angelico
On Mon, Oct 29, 2012 at 4:18 PM, Tianyin Xu wrote: > However, I have the following configuration settings in postgresql.conf > > application_name = 'mypostgres' > log_line_prefix = '[%a] ' > I'm not familiar with this usage of setting application_name in postgresql.conf - usually I set it as part

[GENERAL] How to print application_name in log_line_prefix (using %a)?

2012-10-28 Thread Tianyin Xu
Hi, guys, Could anyone tell me how to specify the application_name as the log_line_prefix? According to the manual at http://www.postgresql.org/docs/9.2/static/runtime-config-logging.html#GUC-APPLICATION-NAME : " application_name (string) The application_name can be any string of less than NAME

[GENERAL] How to print application_name in log_line_prefix (using %a)?

2012-10-28 Thread Tianyin Xu
Hi, guys, Could anyone tell me how to specify the application_name as the log_line_prefix? According to the manual at http://www.postgresql.org/docs/9.2/static/runtime-config-logging.html#GUC-APPLICATION-NAME : " application_name (string) The application_name can be any string of less than NAME

[GENERAL] SPI_prepare's parameter

2012-10-28 Thread 高健
I am new to PostgreSQL's SPI(Server Programming Interface). I can understand PostgreSQL's exampel of using SPI. But I am not sure about SPI_prepare's parameter. void * SPI_prepare(const char * command, int nargs, Oid * argtypes) Can somebody kindly give an example of using SPI_prepare ?

Re: [GENERAL] pg_lesslog - status?

2012-10-28 Thread Michael Paquier
On Mon, Oct 29, 2012 at 4:08 AM, Karl Denninger wrote: > Does anyone know where this stands? > pg_lesslog has been created initially by Koichi Suzuki at NTT, and as far as I know, nobody is maintaining this project there. > I used this a while back in the 8.x days but had a serious bug problem

Re: [GENERAL] table logging

2012-10-28 Thread Julian
On 29/10/12 06:25, Jeff Janes wrote: I am looking for some very simple table logging. I am not trying to do auditing in a hostile environment, just simple logging. I found two candidates, tablelog from pgfoundry, and http://wiki.postgresql.org/wiki/Audit_trigger_91plus The first has the advant

[GENERAL] table logging

2012-10-28 Thread Jeff Janes
I am looking for some very simple table logging. I am not trying to do auditing in a hostile environment, just simple logging. I found two candidates, tablelog from pgfoundry, and http://wiki.postgresql.org/wiki/Audit_trigger_91plus The first has the advantage of being simple, but hasn't been ma

[GENERAL] pg_lesslog - status?

2012-10-28 Thread Karl Denninger
Does anyone know where this stands? I used this a while back in the 8.x days but had a serious bug problem with it -- which was later fixed. The latest checks I can find say it was updated for 9.0, but that leaves open the question as to whether it functions correctly with the current release. T