Re: [GENERAL] Using Epoch to save timestamps in 4 bytes?

2008-05-08 Thread Bruce Momjian
Francisco Reyes wrote: > While looking at a database I inheritted I noticed the database has tables > with integers used to store epoch. > > I noticed that timestamp is 8 bytes and was wondering how come timestamp is > 8 bytes and not 4. Is it to be able to support precission beyond a second? >

[GENERAL] Using Epoch to save timestamps in 4 bytes?

2008-05-08 Thread Francisco Reyes
While looking at a database I inheritted I noticed the database has tables with integers used to store epoch. I noticed that timestamp is 8 bytes and was wondering how come timestamp is 8 bytes and not 4. Is it to be able to support precission beyond a second? I am looking at tens of millions

Re: [GENERAL] Fragments in tsearch2 headline

2008-05-08 Thread Bruce Momjian
Where are we on this? --- Teodor Sigaev wrote: > > The patch takes into account the corner case of overlap. Here is the > > code for that > > // start check > > if (!startHL && *currentpos >= startpos) > >startHL = 1

[GENERAL] changing language of system messages

2008-05-08 Thread Thomas H.
since the update from 8.3.0 to 8.3.1., postgresql system & error messages as well as all logfile entries appear in german. i've already tried to change LC_MESSAGE in the postgres.conf without luck. the db's LC_COLLATE is 'German_Switzerland', and i do not want to change it. i'd just like to ha

Re: [GENERAL] statistics collector process is thrashing my cpu

2008-05-08 Thread William Temperley
On Thu, May 8, 2008 at 6:14 PM, Magnus Hagander <[EMAIL PROTECTED]> wrote: > William Temperley wrote: >> > > >> > > Any ideas why this might be happening, and how I can stop it? >> > >> > It'd be interesting to know what the stats collector is actually >> > doing. Could you, using Process Explor

Re: [GENERAL] auto-vacuum questions

2008-05-08 Thread John Gateley
On Thu, 8 May 2008 10:58:47 -0700 Alan Hodgson <[EMAIL PROTECTED]> wrote: > On Thursday 08 May 2008, John Gateley <[EMAIL PROTECTED]> wrote: > > But the new database, mydbtest, always has slow queries. > > I run an analyze and they speed up. > > Do the query plans actually change, or are you jus

Re: [GENERAL] auto-vacuum questions

2008-05-08 Thread Alan Hodgson
On Thursday 08 May 2008, John Gateley <[EMAIL PROTECTED]> wrote: > But the new database, mydbtest, always has slow queries. > I run an analyze and they speed up. Do the query plans actually change, or are you just seeing caching effects from running the analyze? -- Alan signature.asc Descrip

Re: [GENERAL] Using a composite SQL type in C

2008-05-08 Thread Dan Myers
Toby Chavez wrote: Check the documentation about using composite-type arguments in C http://www.postgresql.org/docs/8.2/static/xfunc-c.html#AEN37402 [...] A quick google search brought up this tutorial that might help http://linuxgazette.net/142/peterson.html Cheers I found the documentat

Re: [GENERAL] statistics collector process is thrashing my cpu

2008-05-08 Thread Magnus Hagander
William Temperley wrote: > > > > > > Any ideas why this might be happening, and how I can stop it? > > > > It'd be interesting to know what the stats collector is actually > > doing. Could you, using Process Explorer or a debugger, get a stack > > trace from that process while it's in the trashi

Re: [GENERAL] Using a composite SQL type in C

2008-05-08 Thread Toby Chavez
Check the documentation about using composite-type arguments in C http://www.postgresql.org/docs/8.2/static/xfunc-c.html#AEN37402 You can use GetAttributeByNum() or GetAttributeByName() to get each value from your custom type. You will need to get the HeapTupleHeader first by calling PG_GETARG_HEA

Re: [GENERAL] Problems with memory

2008-05-08 Thread Shane Ambler
Richard Huxton wrote: Pau Marc Munoz Torres wrote: Hi To your initial question all configurable options can be found and adjusted in the postgresql.conf which can be found in the top of your data dir. You can find more detail on what the options are for at http://www.postgresql.org/docs/8.

Re: [GENERAL] now i'm really confused. insert/update does autocast, where sometimes.

2008-05-08 Thread Peter Eisentraut
Am Dienstag, 6. Mai 2008 schrieb Daniel Schuchardt: > so it depends on ? if i need an explicit cast? A type cast can be attempted in three different contexts (see also CREATE CAST reference page): - implicitly - storage assignment - explicitly The explicit case is if you call CAST() or ::. Thi

Re: [GENERAL] auto-vacuum questions

2008-05-08 Thread John Gateley
On Thu, 8 May 2008 10:54:32 -0400 Alvaro Herrera <[EMAIL PROTECTED]> wrote: > John Gateley wrote: > > Hi, I have a couple of questions on the auto-vacuum daemon: > > > > 1) How do I know it is running. > > Open a session and run "SHOW autovacuum". If it says "on", it's > vacuuming. Keep an eye

Re: [GENERAL] auto-vacuum questions

2008-05-08 Thread Alvaro Herrera
John Gateley wrote: > Hi, I have a couple of questions on the auto-vacuum daemon: > > 1) How do I know it is running. I suspect it has not been, and > I carefully checked the documentation and found a variable that > wasn't set (stats_row_level defaults to off in 8.1, should be > "on"). So I chang

[GENERAL] auto-vacuum questions

2008-05-08 Thread John Gateley
Hi, I have a couple of questions on the auto-vacuum daemon: 1) How do I know it is running. I suspect it has not been, and I carefully checked the documentation and found a variable that wasn't set (stats_row_level defaults to off in 8.1, should be "on"). So I changed that and restarted, but how d

Re: [GENERAL] regexp_replace in two times?

2008-05-08 Thread Tom Lane
Luca Ferrari <[EMAIL PROTECTED]> writes: > I used the regexp_replace function to make a substitution over a table, but I > got a strange behaviour (please consider I'm not an expert of regex). The > idea is to remove the final part of a code, that could be TIF, ISTTIF, tif, > isttif, and at the

[GENERAL] regexp_replace in two times?

2008-05-08 Thread Luca Ferrari
Hi all, I used the regexp_replace function to make a substitution over a table, but I got a strange behaviour (please consider I'm not an expert of regex). The idea is to remove the final part of a code, that could be TIF, ISTTIF, tif, isttif, and at the same time consider only the records depen

Re: [GENERAL] Cannot update table with OID with linked server in SQl Server

2008-05-08 Thread Ken Allen
Yes the table does have a primary key defined. -Original Message- From: Adrian Klaver [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 06, 2008 7:07 PM To: Ken Allen; pgsql-general@postgresql.org Subject: Re: [GENERAL] Cannot update table with OID with linked server in SQl Server ---

Re: [GENERAL] Custom Base Type in C

2008-05-08 Thread Dimitri Fontaine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Le 8 mai 08 à 01:06, Toby Chavez a écrit : My custom type needs to have one biginteger and one text value... pretty straight forward. I guess my first question is if there are any examples out there that do something similar. I have looked

Re: [GENERAL] Import German Decimal Numbers

2008-05-08 Thread Dimitri Fontaine
Hi, Le 7 mai 08 à 15:57, Tino Wildenhain a écrit : There is also http://pgfoundry.org/projects/pgloader/ and if not already implemented it should be fairly easy to implement a data filter within this one. pgloader indeed support user reformating modules, and comes with a mysql to pgsql times

Re: [GENERAL] Problems with memory

2008-05-08 Thread Richard Huxton
Pau Marc Munoz Torres wrote: Hi maybe i should give you some more explanations of my problem. The reason for which i think that postgresql run out of memory is that: I have a relation with 6 fields, 29 indexes and 32000 registers, the registers where made up using a pgsql language to save disk

Re: [GENERAL] statistics collector process is thrashing my cpu

2008-05-08 Thread William Temperley
> > > > Any ideas why this might be happening, and how I can stop it? > > It'd be interesting to know what the stats collector is actually doing. > Could you, using Process Explorer or a debugger, get a stack trace from > that process while it's in the trashing state? > > //Magnus > Certainl

Re: [GENERAL] Problems with memory

2008-05-08 Thread Pau Marc Munoz Torres
Hi maybe i should give you some more explanations of my problem. The reason for which i think that postgresql run out of memory is that: I have a relation with 6 fields, 29 indexes and 32000 registers, the registers where made up using a pgsql language to save disk space, and they "work" (see the

Re: [GENERAL] statistics collector process is thrashing my cpu

2008-05-08 Thread Magnus Hagander
William Temperley wrote: > Dear All > > Sometimes postgres.exe will thrash one of the cores and won't stop > until I kill the process. I know it's the statistics collector as I > get this message when I kill the process: > "statistics collector process (PID 172) exited with exit code 1" > Nothing

[GENERAL] statistics collector process is thrashing my cpu

2008-05-08 Thread William Temperley
Dear All Sometimes postgres.exe will thrash one of the cores and won't stop until I kill the process. I know it's the statistics collector as I get this message when I kill the process: "statistics collector process (PID 172) exited with exit code 1" Nothing other than this app is accessing my PG

Re: [GENERAL] pg_dumpall: pg_conversion table not saved

2008-05-08 Thread Michael Enke
Tom Lane schrieb: > Michael Enke <[EMAIL PROTECTED]> writes: >> I updated pg_converion to set the condefault=false where I need it. > > Why are you needing to replace an existing default conversion? > Do we have a bug in it? No, not a bug. But I need CP852 encoding conversion. Maybe you can take

[GENERAL] TSearch2 Searching Text with Synonyms and Stop Dictionary

2008-05-08 Thread xaviergxf
Hi, I´m trying to use the tsearch2 with postgre 8.2. What i am trying to do its: from a text search the text and synonyms excluding the words that doesn´t mean nothing like("what", "the", "of"). How can i configure the dictionarys for use both synonyms and stop dictionarys? Can anyone creat

Re: [GENERAL] Ubuntu question

2008-05-08 Thread Justin
Q Master wrote: Hello, I had postgresql 7.4 on ubuntu and over one year ago I moved to 8.2 Till now I was backing up my db via pgadmin remotely from windows but now I want to do it from the ubuntu server. When I run the command pgdump it said that the database is 8.2 but the tool is 7.4 -

Re: [GENERAL] Ubuntu question

2008-05-08 Thread Martijn van Oosterhout
On Thu, May 08, 2008 at 01:52:17AM -0500, Q Master wrote: > I had postgresql 7.4 on ubuntu and over one year ago I moved to 8.2 > Till now I was backing up my db via pgadmin remotely from windows but > now I want to do it from the ubuntu server. I suggest looking at the README.Debian for postgres