Re: [GENERAL] HouseKeeping and vacuum Questions

2007-12-14 Thread Harald Armin Massa
Ow Mun Heng, The current issue which prompted me to do such housekeeping is due to > long database wide vacuum time. (it went from 2 hours to 4 hours to 7 > hours) > If vacuum takes to long, you are doing it not often enough. You should use autovacuum, you should be able to express the delta betw

Re: [GENERAL] HouseKeeping and vacuum Questions

2007-12-14 Thread Ow Mun Heng
On Fri, 2007-12-14 at 09:35 +0100, Harald Armin Massa wrote: > Ow Mun Heng, > > The current issue which prompted me to do such housekeeping is > due to > long database wide vacuum time. (it went from 2 hours to 4 > hours to 7 > hours) > > If vacuum takes

Re: [GENERAL] Planner ignoring to use INDEX SCAN

2007-12-14 Thread Richard Huxton
Ashish Karalkar wrote: query which was taking seconds on the join of these two table suddenly started taking 20/25 min Show the EXPLAIN ANALYSE of your problem query and someone will be able to tell you why. -- Richard Huxton Archonet Ltd ---(end of broadcast)---

Re: [GENERAL] Hash join in 8.3

2007-12-14 Thread André Volpato
Gregory Stark escreveu: André Volpato <[EMAIL PROTECTED]> writes: I think I found the answer! 8.1: likes nested loop even after vacuumdb on the database. 8.3: likes hash at first time but: - after vacuumdb *on the database* (I was running on the tables.), it turns out to: Merge Join (c

Re: [GENERAL] Planner ignoring to use INDEX SCAN

2007-12-14 Thread Ashish Karalkar
Thanks Richard for your replay, here is the output.. Richard Huxton <[EMAIL PROTECTED]> wrote: Ashish Karalkar wrote: > > Richard Huxton wrote: Ashish Karalkar wrote: >> query which was taking seconds on the join of these two table >> suddenly started taking 20/25 min > > Show the EXPLAIN ANAL

[GENERAL] pgsql constraints and temporal tables

2007-12-14 Thread Enrico Sirola
Hello, I'm reading "Developing Time-Oriented Database Applications in SQL" by Richard Snodgrass, and trying to reimplement some of the examples using postgresql. The book is about temporal tables and applications involving time-varying data; the one of the main difficulties with such problems is th

Re: [GENERAL] rewrite pl/pgsql functions to c - remote job

2007-12-14 Thread Richard Huxton
Marek Lewczuk wrote: Hello all, I'm looking for a C developer that is able to rewrite pl/pgsql functions to PostgreSQL c functions You might want to post this to the -jobs mailing list instead. -- Richard Huxton Archonet Ltd ---(end of broadcast)--

Re: [GENERAL] Planner ignoring to use INDEX SCAN

2007-12-14 Thread Richard Huxton
Ashish Karalkar wrote: Thanks Richard for your replay, here is the output.. Richard Huxton <[EMAIL PROTECTED]> wrote: Ashish Karalkar wrote: Richard Huxton wrote: Ashish Karalkar wrote: query which was taking seconds on the join of these two table suddenly started taking 20/25 min Show the E

Re: [GENERAL] rewrite pl/pgsql functions to c - remote job

2007-12-14 Thread Stephen Frost
* Marek Lewczuk ([EMAIL PROTECTED]) wrote: > I'm looking for a C developer that is able to rewrite pl/pgsql functions to > PostgreSQL c functions - because we need better performance we would like > to have all important functions rewritten to c (looking from pl/pgsql point > of view they are no

Re: [GENERAL] rewrite pl/pgsql functions to c - remote job

2007-12-14 Thread Merlin Moncure
On Dec 14, 2007 7:50 AM, Marek Lewczuk <[EMAIL PROTECTED]> wrote: > Hello all, > I'm looking for a C developer that is able to rewrite pl/pgsql functions > to PostgreSQL c functions - because we need better performance we would > like to have all important functions rewritten to c (looking from > p

[GENERAL] mssql migration and boolean to integer problems

2007-12-14 Thread robert
Hi all, I've spent the last few days hacking a mssql INSERT script to work with 8.1.9 - I could build the latest postgres source if need be. My latest problem is: ERROR: column "includeScenario" is of type boolean but expression is of type integer HINT: You will need to rewrite or cast the expre

Re: [GENERAL] top posting

2007-12-14 Thread Lew
Andrew Sullivan wrote: We run this list in English, note. Is that because it's better than Latin? No: it's because more of the participants like it that way. I bet if we had a lot of Latin speakers, we'd have made a different decision. And yes, there's a certain amount of circularity in such

Re: [GENERAL] Planner ignoring to use INDEX SCAN

2007-12-14 Thread Richard Huxton
Ashish Karalkar wrote: Richard Huxton <[EMAIL PROTECTED]> wrote: Ashish Karalkar wrote: query which was taking seconds on the join of these two table suddenly started taking 20/25 min Show the EXPLAIN ANALYSE of your problem query and someone will be able to tell you why. Here is the outpu

Re: [GENERAL] Hijack!

2007-12-14 Thread Lew
Keith Turner wrote: Thank you for your response. What may be obvious to some isn't always to others. It's never a bad idea to remind users how you want your data formatted if there are roadblocks that are not obvious on the surface. Most newsreaders, not just Thunderbird, use the posts' heade

Re: [GENERAL] timestamp with time zone

2007-12-14 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Tatsuo Ishii <[EMAIL PROTECTED]> wrote: % From: "Magnus Hagander" <[EMAIL PROTECTED]> [...] % > > Can I get "+04" without knowing that I inserted the data using "+0400" % > > time zone? % > No. The closest you can get is to store the tz in a different column % and

[GENERAL] Anomalia file FILBD.TXT

2007-12-14 Thread Vincenzo Romano
Buon giorno. Nel file FILBD.TXT sono presenti dei prodotti per il quali il campo "Unita' di Misura" (offset 182) presenza il valore "PM". Allego la lista dei prodotti interessati. -- Vincenzo Romano NotOrAnd.IT Information Technologies cel. +39 339 8083886 tel. +39 0823 454163 fax. +39 02 7005069

Re: [GENERAL] Hijack!

2007-12-14 Thread Lew
Gregory Williamson wrote: Well, off to top post on some other forums ... ;-) statman wrote: Should that not be "Well, off to post on some other fora"? 8¬> No. It /can/ be, but it /needn't/ be. Actually, saying "fora" is variously considered affected, pompous or silly, and is done either

Re: [GENERAL] How can I insert NULL into column with the type of timestamp?

2007-12-14 Thread bookman bookman
Thank you! 2007/12/12, Obe, Regina <[EMAIL PROTECTED]>: > Actually what you are doing below is trying to stuff '' in a timestamp > field. > > Keep in mind '' and NULL are not the same. '' is invalid for timestamp > where as NULL is fine. Your example should be > insert into T_Admin(name,key,r

Re: [GENERAL] pgsql constraints and temporal tables

2007-12-14 Thread Tom Lane
Enrico Sirola <[EMAIL PROTECTED]> writes: > However, I'm facing a problem I'm not able to solve with postgresql: > usually updating or deleting time-varying data means to temporary > violate a constraint in a transaction but ensuring that at the end of > the transaction the table(s) is(are) in a co

[GENERAL] rewrite pl/pgsql functions to c - remote job

2007-12-14 Thread Marek Lewczuk
Hello all, I'm looking for a C developer that is able to rewrite pl/pgsql functions to PostgreSQL c functions - because we need better performance we would like to have all important functions rewritten to c (looking from pl/pgsql point of view they are not complicated, so I thing that an C ex

Re: [GENERAL] mssql migration and boolean to integer problems

2007-12-14 Thread robert
On Dec 12, 11:09 pm, robert <[EMAIL PROTECTED]> wrote: > Hi all, I've spent the last few days hacking a mssql INSERT script to > work with 8.1.9 - I could build the latest postgres source if need be. > My latest problem is: > > ERROR: column "includeScenario" is of type boolean but expression is >

[GENERAL] user name and password woes

2007-12-14 Thread Charles Mortell
The dawg that originally set up postgres 8.0 on one of our Windows 2003 servers has left the company, and I have taken it over. I need to use pg_dump on that server. When I try to, I get ‘user "Administrator" does not exist.’ Next I try ‘createuser –U postgres –W administrator –P’. The

Re: [GENERAL] Hijack!

2007-12-14 Thread Alvaro Herrera
Lew wrote: > Trevor Talbot wrote: >> On 12/11/07, Guy Rouillier <[EMAIL PROTECTED]> wrote: >> >>> Now, a gripe rightly attributable to the to PG mailing list setup is >>> that every time I reply, I have to: >>> >>> (1) use reply all, because reply is set to go to the individual rather >>> than the

Re: [GENERAL] what is the date format in binary query results

2007-12-14 Thread Andrew Chernow
Merlin Moncure wrote: On Dec 12, 2007 2:14 AM, Samantha Atkins <[EMAIL PROTECTED]> wrote: This brings up a second question. How should I do byte order conversion for 8 byte ints? I can't use hton ntoh routines as they max out at 32 bits. Is there a better way? Also, are floating point number

[GENERAL] Finding bad bye in "invalid byte sequence" error

2007-12-14 Thread robert
Hi all, I'm trying to hack my inserts script from mssql to work with postgres 8.1.9 - I can upgrade if need be. I'm getting this error: psql -h localhost atdev < fuk2.sql ERROR: invalid byte sequence for encoding "UTF8": 0xe1204f HINT: This error can also happen if the byte sequence does not ma

Re: [GENERAL] pgsql constraints and temporal tables

2007-12-14 Thread Enrico Sirola
Hi Tom! Tom Lane ha scritto: > Enrico Sirola <[EMAIL PROTECTED]> writes: >> However, I'm facing a problem I'm not able to solve with postgresql: >> usually updating or deleting time-varying data means to temporary >> violate a constraint in a transaction but ensuring that at the end of >> the tran

Re: [GENERAL] Hijack!

2007-12-14 Thread Lew
Gregory Williamson wrote: * Get a life -- how people post is _trivial_. *content* over *form* ! Beating dead horses is of no interest other than the inherent joy in the thing. Deal with the fact that an open mail ist will have users from *all* backgrounds and origins and it you can't make every

[GENERAL] query

2007-12-14 Thread marco santillan
Hello I need to be able distribute like my application with postgresql to the final client and since as I can assure or encryptar the database to avoid the command trust. Thank you __ ¿Chef por primera vez? Sé un mejor Cocinillas. http:/

[GENERAL] How can i deal with "\n" when copy tables from sqlserver2005 to postgre?

2007-12-14 Thread bookman bookman
H i , I have solved the "insert NULL" problem,but another problem is feazing me now.I have a table t_book in sqlserver,I exported it to t_book.txt ,the column content has some special show( I made it purposely). --t_book.txt bookid(int)bookname(varchar(50)) content 1

Re: [GENERAL] Planner ignoring to use INDEX SCAN

2007-12-14 Thread Gregory Stark
"Ashish Karalkar" <[EMAIL PROTECTED]> writes: > Thanks Richard for your replay, > > Richard Huxton <[EMAIL PROTECTED]> wrote: >> > Actually, this is the output from EXPLAIN not EXPLAIN ANALYSE. It > doesn't show what actually happened, just what the planner thought was > going to happen. > > I

Re: [GENERAL] Hijack!

2007-12-14 Thread Thomas Hart
Lew wrote: Trevor Talbot wrote: On 12/11/07, Guy Rouillier <[EMAIL PROTECTED]> wrote: Now, a gripe rightly attributable to the to PG mailing list setup is that every time I reply, I have to: (1) use reply all, because reply is set to go to the individual rather than the list (2) delete all t

Re: [GENERAL] Trigger - will not perform INSERT

2007-12-14 Thread smiley2211
Thanks all...ended up being a missing field in my table definition...sorry to bother you all ... :wistle: -- View this message in context: http://www.nabble.com/Trigger---will-not-perform-INSERT-tp14282848p14297220.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. --

Re: [GENERAL] Finding bad bye in "invalid byte sequence" error

2007-12-14 Thread Douglas McNaught
On 12/13/07, robert <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm trying to hack my inserts script from mssql to work with postgres > 8.1.9 - I can upgrade if need be. I'm getting this error: > > psql -h localhost atdev < fuk2.sql > ERROR: invalid byte sequence for encoding "UTF8": 0xe1204f > HINT:

Re: [GENERAL] convert function

2007-12-14 Thread Jan Sunavec
Thanks a lot Lots like nice a easy solution.. I am not sure if this is fast solution.. Many convertions you know.. :-( Thanks a lot anyway. John On Wed, 12 Dec 2007 17:13:01 +0100, Pavel Stehule <[EMAIL PROTECTED]> wrote: Hello It's look like SQL_ASCII support diacritic chars now. Fi

Re: [GENERAL] Planner ignoring to use INDEX SCAN

2007-12-14 Thread Ashish Karalkar
Richard Huxton <[EMAIL PROTECTED]> wrote: Ashish Karalkar wrote: > query which was taking seconds on the join of these two table > suddenly started taking 20/25 min Show the EXPLAIN ANALYSE of your problem query and someone will be able to tell you why. Here is the output from explain analyse:

Re: [GENERAL] Hijack!

2007-12-14 Thread Lew
Trevor Talbot wrote: On 12/11/07, Guy Rouillier <[EMAIL PROTECTED]> wrote: Now, a gripe rightly attributable to the to PG mailing list setup is that every time I reply, I have to: (1) use reply all, because reply is set to go to the individual rather than the list (2) delete all the individua

Re: [GENERAL] top posting

2007-12-14 Thread Lew
Ron St-Pierre wrote: I agree that top-posting can sometimes be easier to read. However, from the perspective of someone who *often* searches the archives for answers it is usually *much* easier to find a complete problem/solution set when the responses are bottom posted and/or interleaved. Th

Re: [GENERAL] Finding bad bye in "invalid byte sequence" error

2007-12-14 Thread Tom Lane
robert <[EMAIL PROTECTED]> writes: > I'm getting this error: > psql -h localhost atdev < fuk2.sql > ERROR: invalid byte sequence for encoding "UTF8": 0xe1204f > HINT: This error can also happen if the byte sequence does not match > the encoding expected by the server, which is controlled by > "c

Re: [GENERAL] Hijack!

2007-12-14 Thread Richard Huxton
Leif B. Kristensen wrote: I > me too. t > ' > On Wednesday 12. December 2007, Gregory Stark wrote: s >> "Alvaro Herrera" <[EMAIL PROTECTED]> writes: >>> Thomas Kellerer wrote: n Joshua D. Drake, 11.12.2007 17:43: o > O.k. this might be a bit snooty but frankly it is almost 2008

[GENERAL] size cost for null fields

2007-12-14 Thread Vance Maverick
I have a table with lots and lots of rows (into the millions), and I want to add some information to it. The new data consists of a VARCHAR and a BYTEA, and it will almost always be null -- let's say only one row in 10,000 will have non-null values. I'm trying to decide whether to add the new

Re: [GENERAL] mssql migration and boolean to integer problems

2007-12-14 Thread Richard Broersma Jr
--- On Thu, 12/13/07, robert <[EMAIL PROTECTED]> wrote: > > Hi all, I've spent the last few days hacking a > mssql INSERT script to > > work with 8.1.9 - I could build the latest postgres > source if need be. a standard cast() wouldn't work for you? proj02u20411=> select cast( 1 as boolean), pr

Re: [GENERAL] How can i deal with "\n" when copy tables from sqlserver2005 to postgre?

2007-12-14 Thread Ivan Sergio Borgonovo
On Fri, 14 Dec 2007 17:29:21 +0800 "bookman bookman" <[EMAIL PROTECTED]> wrote: > I have solved the "insert NULL" problem,but another problem is > feazing me now.I have a table t_book in sqlserver,I exported it to export in csv with DTS and import in pgsql with \copy csv mode. It should works. I

Re: [GENERAL] query

2007-12-14 Thread Colin Wetherbee
marco santillan wrote: I need to be able distribute like my application with postgresql to the final client and since as I can assure or encryptar the database to avoid the command trust. Tu pregunta fue traducida mal. Visita por favor el URL siguiente para la información sobre la comunidad e

Re: [GENERAL] Hijack!

2007-12-14 Thread Andrej Ricnik-Bay
On 12/15/07, Richard Huxton <[EMAIL PROTECTED]> wrote: L > Leif B. Kristensen wrote: O > I > me too. L > t > > ' > On Wednesday 12. December 2007, Gregory Stark wrote: > s >> "Alvaro Herrera" <[EMAIL PROTECTED]> writes: >>>> Thomas Kellerer wrote: > n Joshua D. Drake, 11

Re: [GENERAL] postgres writer process growing up too much

2007-12-14 Thread Richard Huxton
Heiner Vega wrote: Hi to everyone I've been monitoring my postgres processes and I noticed that the resident memory size of the writer process is growing up too much. YESTERDAY: PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 11419 postgres 15 0 155m 112m 112m

Re: [GENERAL] user name and password woes

2007-12-14 Thread Richard Huxton
Charles Mortell wrote: The dawg that originally set up postgres 8.0 on one of our Windows 2003 servers has left the company, and I have taken it over. I need to use pg_dump on that server. When I try to, I get ‘user "Administrator" does not exist.’ Next I try ‘createuser –U postgres –W

[GENERAL] postgres writer process growing up too much

2007-12-14 Thread Heiner Vega
Hi to everyone I've been monitoring my postgres processes and I noticed that the resident memory size of the writer process is growing up too much. Those are reports from top in a 24 hour interval: YESTERDAY: PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 11706 postgres

Re: [GENERAL] mssql migration and boolean to integer problems

2007-12-14 Thread Gregory Stark
"robert" <[EMAIL PROTECTED]> writes: > So it has two 'bool' - "includeScenario" and "deleted" . I have an > insert like... > > INSERT INTO "ASSETSCENARIO" > ("assetScenarioID",OBJ_VERSION,"includeScenario","scenarioName","probability","occurenceDate","notes","priceTarget","assetID","created","mo

Re: [GENERAL] size cost for null fields

2007-12-14 Thread Gregory Stark
"Vance Maverick" <[EMAIL PROTECTED]> writes: > Do I have this right? If so, the side table sounds like the right choice No, if the null bit is set then the field isn't stored at all. You don't pay the alignment or storage overhead at all. The only cost is for the null bitmap itself. If you

[GENERAL] Julian Day 0 question

2007-12-14 Thread Andrew Chernow
Ran across something that is confusing me. The docs for to_char indicates that julian day 0 is January 1, 4712 BC at midnight. http://www.postgresql.org/docs/8.3/static/functions-formatting.html When I run to_char, I don't get 0 for that date. postgres=# select to_char('4712-01-01 BC'::date,

[GENERAL] settings for 8.2.5 on Mac OS X 10.4.11

2007-12-14 Thread Matthew Hixson
What are good settings for shared_buffers and max_connections with the above software combo? Out of the box I'm getting the "Cannot allocate memory" message upon doing a 'make check'. Thanks, -M@ ---(end of broadcast)--- TIP 1: if posting/

Re: [GENERAL] Julian Day 0 question

2007-12-14 Thread Pavel Stehule
On 14/12/2007, Andrew Chernow <[EMAIL PROTECTED]> wrote: > Ran across something that is confusing me. The docs for to_char > indicates that julian day 0 is January 1, 4712 BC at midnight. > > http://www.postgresql.org/docs/8.3/static/functions-formatting.html > > When I run to_char, I don't get 0

Re: [GENERAL] user name and password woes

2007-12-14 Thread brian
Richard Huxton wrote: Charles Mortell wrote: The dawg that originally set up postgres 8.0 on one of our Windows 2003 servers has left the company, and I have taken it over. I need to use pg_dump on that server. When I try to, I get ‘user "Administrator" does not exist.’ Next I try ‘creat

Re: [GENERAL] Julian Day 0 question

2007-12-14 Thread Andrew Chernow
Pavel Stehule wrote: On 14/12/2007, Andrew Chernow <[EMAIL PROTECTED]> wrote: Ran across something that is confusing me. The docs for to_char indicates that julian day 0 is January 1, 4712 BC at midnight. http://www.postgresql.org/docs/8.3/static/functions-formatting.html When I run to_char,

Re: [GENERAL] Hijack!

2007-12-14 Thread Martijn van Oosterhout
On Fri, Dec 14, 2007 at 01:55:04PM -0300, Alvaro Herrera wrote: > > I'm really glad that people don't do that on this list. I /hate/ getting > > individual email copies from list posters. I'm going to read it on the > > list; why in the world would I want that clutter in my inbox? > > Huh, you

Re: [GENERAL] Hijack!

2007-12-14 Thread Thomas Hart
Martijn van Oosterhout wrote: On Fri, Dec 14, 2007 at 01:55:04PM -0300, Alvaro Herrera wrote: I'm really glad that people don't do that on this list. I /hate/ getting individual email copies from list posters. I'm going to read it on the list; why in the world would I want that clutter in

Re: [GENERAL] settings for 8.2.5 on Mac OS X 10.4.11

2007-12-14 Thread Tom Lane
Matthew Hixson <[EMAIL PROTECTED]> writes: > What are good settings for shared_buffers and max_connections with > the above software combo? Out of the box I'm getting the "Cannot > allocate memory" message upon doing a 'make check'. The best thing is to fix the OS' ridiculously small shmem li

Re: [GENERAL] postgres writer process growing up too much

2007-12-14 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > Heiner Vega wrote: >> I've been monitoring my postgres processes and I noticed that the resident >> memory >> size of the writer process is growing up too much. > Notice the "SHR"=shared value. That's 155MB virtual memory, 140MB of it > resident of whi

Re: [GENERAL] Julian Day 0 question

2007-12-14 Thread Tom Lane
Andrew Chernow <[EMAIL PROTECTED]> writes: > Looks like a difference in calendars: I think the docs give the starting > date in Julian proleptic Calendar while to_char returns Gregorian > proleptic Calendar. Yeah. We're definitely using Gregorian counting, because we're omitting leap years at m

Re: [GENERAL] mssql migration and boolean to integer problems

2007-12-14 Thread Adrian Klaver
On Wednesday 12 December 2007 8:09 pm, robert wrote: > Hi all, I've spent the last few days hacking a mssql INSERT script to > work with 8.1.9 - I could build the latest postgres source if need be. > My latest problem is: > > ERROR: column "includeScenario" is of type boolean but expression is > o

Re: [GENERAL] Finding bad bye in "invalid byte sequence" error

2007-12-14 Thread Adrian Klaver
On Thursday 13 December 2007 10:38 am, robert wrote: > Hi all, > > I'm trying to hack my inserts script from mssql to work with postgres > 8.1.9 - I can upgrade if need be. I'm getting this error: > > psql -h localhost atdev < fuk2.sql > ERROR: invalid byte sequence for encoding "UTF8": 0xe1204f >

[GENERAL] setting and using variables in PSQL ????

2007-12-14 Thread Gauthier, Dave
Hi: At the PSQL prompt, I want to set some variables based upon query results, or via static assignment, then insert a record with those values. Sort of like... select val1 into x from agedata where name = 'joe_mako'; select val12 into y from sizedata where name = 'joe_mako'; thename :=

Re: [GENERAL] setting and using variables in PSQL ????

2007-12-14 Thread Nathan Wagner
On Dec 14, 2007, at 9:19 PM, Gauthier, Dave wrote: At the PSQL prompt, I want to set some variables based upon query results, or via static assignment, then insert a record with those values. Sort of like... select val1 into x from agedata where name = ‘joe_mako’; select val12 into y from