Re: [GENERAL] SQL statement logging: picking up strange queries from "pg_catalog"

2010-07-03 Thread Tom Lane
Graham Leggett writes: > Does postgresql have an access log where the lifetime of database > connections are tracked? Specifically tracking when the client > connected, and how long the client stayed connected for. See log_connections and log_disconnections. You probably want to add PID to l

Re: [GENERAL] SQL statement logging: picking up strange queries from "pg_catalog"

2010-07-03 Thread Graham Leggett
On 04 Jul 2010, at 12:49 AM, Tom Lane wrote: I'd bet that you are using a client-side driver that feels a need to fetch metadata about the tables it's working with. JDBC or ODBC maybe? A reasonable driver would cache such information, so if there are enough of these to present a performa

Re: [GENERAL] SQL statement logging: picking up strange queries from "pg_catalog"

2010-07-03 Thread Tom Lane
Graham Leggett writes: > I am currently trying to analyse some performance problems within my > postgresql v8.4.4 database, and after successfully turning sql > statement logging on, I discover thousands and thousands of queries > being made what looks like an internal postgresql set of tabl

[GENERAL] SQL statement logging: picking up strange queries from "pg_catalog"

2010-07-03 Thread Graham Leggett
Hi all, I am currently trying to analyse some performance problems within my postgresql v8.4.4 database, and after successfully turning sql statement logging on, I discover thousands and thousands of queries being made what looks like an internal postgresql set of tables in a database cal

Re: [GENERAL] Requested addition to the todo list [was]: Re: Altering Domain Constraints on composite types

2010-07-03 Thread Bruce Momjian
Richard Broersma wrote: > I'd like to propose the following items be added to the todo list: > (Any thoughts?) > > 1) Modify composite types to allow ALTER DOMAIN(s) to ADD CONSTRAINT. > 2) Allow a since ALTER DOMAIN issue multiple ADD and DROP commands in > a single statement. This is not curre

Re: [GENERAL] Does psql -f quit insertion after an error in a statement has been detected?

2010-07-03 Thread Bruce Momjian
Wang, Mary Y wrote: > Hi, > > I'm using a psql -f command to reload the data from a dump file. I > noticed that some tables are not populated with any rows (I mean 0 > rows), yet, if I manually insert a row (actually just copy an INSERT > statement from that input file) in the interactive termina

Re: [GENERAL] problems with encoding and accent letters

2010-07-03 Thread aaaawwww
On Jul 2, 12:39 am, pie...@hogranch.com (John R Pierce) wrote: > On 07/01/10 2:27 PM, wrote: > > > Sorry I forgot to say I am running an Italian php website with a > > postgresql DB. Users can write messages eachothers. > > This is my code: > > $connessione_db = pg_connect("dbname=x us

Re: [GENERAL] C-Functions using SPI - Missing Magic Block

2010-07-03 Thread Martijn van Oosterhout
On Sat, Jul 03, 2010 at 09:35:56AM +0800, Craig Ringer wrote: > On 02/07/10 21:26, saitenhe...@web.de wrote: > > > #ifdef PG_MODULE_MAGIC > > PG_MODULE_MAGIC; > > #endif > > Why the conditional compilation of PG_MODULE_MAGIC? That's the recommendation, so the module compiles on all versions of P

Re: [GENERAL] Half-applied UPDATE rule on view

2010-07-03 Thread Dean Rasheed
On 2 July 2010 23:27, A.M. wrote: > Hello, > > I have encountered an odd behavior involving rules which the following script > demonstrates (in postgresql 8.4.3). Note that at the end of the run, the > "dud" table contains one row "spam1" when the update rule clearly contains > two inserts to t