Re: [GENERAL] question about postgresql time intervals

2006-03-16 Thread Michael Glaesemann
On Mar 16, 2006, at 10:13 , Tom Lane wrote: But the syntax has been accepted for a long time, at least back to 7.0. Well, look at that! Is this documented? Looks like I should install the DocBook toolchain again. Michael Glaesemann grzm myrealbox com ---(end of

Re: [GENERAL] What's a good default encoding?

2006-03-16 Thread Martijn van Oosterhout
On Thu, Mar 16, 2006 at 07:30:36AM +0100, Harald Armin Massa wrote: > Good default encoding: > > does somebody NOT agree that UTF8 is quite a recommendation, at least for > all the people without Korean, Japanese and Chinese Chars? I know, that's at > maximum 2/3 of our potential user base, but be

Re: [GENERAL] What's a good default encoding?

2006-03-16 Thread Magnus Hagander
> > Maybe we could even "suggest" UTF8 in the "getting started" > (i.e. the > > windows installer initdb screen, or other default > installations) Sth. > > like "if you do not know better, take utf8" > > UTF-8 on windows works pretty well. It does, but it has an extra speed penalty. For any c

Re: [GENERAL] PostgreSQL on Windows not starting

2006-03-16 Thread Magnus Hagander
> I have a customer who is having issues starting PostgreSQL > 8.1 on Windows. It worked for a while and now doesn't appear > to be running. I thought it was probably a stale pidfile, > but had him search and could not find it. Is the pid > information still in a pidfile or is it in the regi

[GENERAL] picking the correct locale when doing initdb

2006-03-16 Thread Harald Armin Massa
on bugs Magnus wrote:> It's a matter of picking the correct locale when you initdb your database.and he is PERFECTLY right. Getting the locale wrong while doing intidb can really screw up ones day. But: because of initdb being at the very beginning, it is a really tough decision based on not a lot

[GENERAL] Pb d'installation de postgreSQL 8.1.3-1 win32

2006-03-16 Thread Ets ROLLAND
Hello !   I experience problem with PG 8.1.3 on an Win XP Pro box. PG hang on that box, I don't know why, I use PG 8 since 8.0 was available on Windows. So I uninstall PG 8.1.3 (I have a backup with pgAdmin3), and I try to reinstall PG 8.1.3, but the installation failed ! I redo after deleti

Re: [GENERAL] PostgreSQL Knowledge Base

2006-03-16 Thread Stephen Slezak
No limit on the type of articles that can be submitted. The system can easily accommodate the creation subsections/categories so we can easily break out different types of articles into different sections. Searches can them be made on the entire KB or only a specific section. Steve -Original

Re: [GENERAL] What's a good default encoding?

2006-03-16 Thread CSN
I tried changing my database to UTF8 and then importing the dump (even tried iconv). It choked (on an accented e). Then somehow the database got created as LATIN9, and I was able to import successfully. I guess if it works, I'll be leaving it alone for the time being. I still have problems when em

Re: [GENERAL] What's a good default encoding?

2006-03-16 Thread Martijn van Oosterhout
On Thu, Mar 16, 2006 at 03:11:27AM -0800, CSN wrote: > I tried changing my database to UTF8 and then > importing the dump (even tried iconv). It choked (on > an accented e). Then somehow the database got created > as LATIN9, and I was able to import successfully. I > guess if it works, I'll be leav

Re: [GENERAL] question about postgresql time intervals

2006-03-16 Thread Linda
On Wednesday 15 March 2006 8:13 pm, Tom Lane wrote: > Michael Glaesemann <[EMAIL PROTECTED]> writes: > > On Mar 15, 2006, at 23:39 , Linda wrote: > >> According to the SQL standard, shouldn't this work? > >> > >> select '506:47:04'::interval day to second ; > > > No one has implemented this in Po

[GENERAL] Only 6 days left to get PGLA for 5 dollars (promtion has been adjusted to 100 units)

2006-03-16 Thread Tony Caduto
There is six days left for our end of winter promotion, and I had to adjust the units sold goal to 100 because of poor response. Currently we are at 66 units sold and I think it's going to be tough even to reach 100. Regardless of the amount sold I will still donate the 1 dollar per sale, i

Re: [GENERAL] How do I make a timestamp column default to current time

2006-03-16 Thread William ZHANG
"zagman" <[EMAIL PROTECTED]> > > Hi, > > I'm setting up a simple timecard program and I need a column that > defaults to the current time when a new row is inserted. How can I do > this I tried setting the default to 'now' but all that does is put the > time I created the table in each row! I'm al

[GENERAL] How do I make a timestamp column default to current time

2006-03-16 Thread zagman
Hi, I'm setting up a simple timecard program and I need a column that defaults to the current time when a new row is inserted. How can I do this I tried setting the default to 'now' but all that does is put the time I created the table in each row! I'm also new to postgresql and if someone can gi

[GENERAL] PostgreSQL scalability concerns

2006-03-16 Thread Alen Garia - IT
Hi, We are currently planning the deployment of our next generation enterprise database and we are wondering whether or not PostgreSQL could do the heavy lifting that would be required. My post is a little bit long but I hope it will provide you with information to allow someone to provide a

Re: [GENERAL] \copy combine with SELECT

2006-03-16 Thread jia ding
yes, of couse COPYbut,=> copy test to 'test.txt';ERROR:  must be superuser to COPY to or from a fileHINT:  Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone. On 3/16/06, Chris <[EMAIL PROTECTED]> wrote: jia ding wrote:> Hi all,>> I tried:> select id, name  into tab

[GENERAL] Replication & web apps

2006-03-16 Thread Leonardo Francalanci
Hi, I still don't understand how replication can be used in web applications. Given this scenario: 1) user updates his profile -> update to the db (master) 2) web app redirects to the "profile page" -> select from db (slave) Since (2) is a select it is issued to the slave. How can one be sure

Re: [GENERAL] Replication & web apps

2006-03-16 Thread Jeff Amiel
Well, you've hit upon the difference between synchronous replication and asynchronous replication (and touched on the idea of clustering/load balancing) In a synchronous replication scheme, the database update is made to BOTH master and slave simultaneouslythe transactions must commit to bot

Re: [GENERAL] Replication & web apps

2006-03-16 Thread Jeff Amiel
I just reread your post and see that you already understand that what you are describing is async replication. Duh. That being said, what you are trying to do is really combine the idea of load balancing and async replicationnot too feasible I would think. Usually when people are using asy

Re: [GENERAL] PostgreSQL scalability concerns

2006-03-16 Thread Louis Gonzales
Hope this helps: http://www.postgresql.org/files/about/casestudies/wcgcasestudyonpostgresqlv1.2.pdf http://www.postgresql.org/about/users ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] How do I make a timestamp column default to current time

2006-03-16 Thread Tom Lane
"zagman" <[EMAIL PROTECTED]> writes: > I'm setting up a simple timecard program and I need a column that > defaults to the current time when a new row is inserted. How can I do > this I tried setting the default to 'now' but all that does is put the > time I created the table in each row! The defa

[GENERAL] Error I don't understand, losing synch with server

2006-03-16 Thread Scott Ribe
Every once in a while I log this error executing a query: message contents do not agree with length in message type "D" lost synchronization with server: got message type "O", length 1398030676 And from that point forward any use of the connection just returns a null result. I'm running 8.0.4 on

Re: [GENERAL] Wisconsin Circuit Court Access (WCCA) on

2006-03-16 Thread Scott Ribe
> We've probably got a pretty good idea already. :) Besides, all you'd be > able to get down to would be: what database vendors the state uses > (probably more than one) filtered by which of those have such a clause > in their license (also probably more than one), so in the end all you > know is

Re: [GENERAL] Replication & web apps

2006-03-16 Thread Leonardo Francalanci
pg_cluster is an example of a synchronous replication method (although it's really considered multi-master...not master-slave) It looks like pgcluster is what I would need, I just don't understand how it works... aren't there some "good" docs about it? Which are its limits? And: is there a w

Re: [GENERAL] Replication & web apps

2006-03-16 Thread Philip Hallstrom
There are other techniques to balance the load of the database calls so that some go to one box and some to others, yet keep the data in synch... Continuent makes a commercial p/cluster product as well as an open source product called Sequoia that sit in the JDBC layer and direct traffic and co

Re: [GENERAL] How do I make a timestamp column default to current time

2006-03-16 Thread John D. Burger
Tom Lane writes: Try mycol timestamp default now() or mycol timestamp default current_timestamp (the latter is actually a function call, even though the SQL standard says it has to be spelled without any parentheses) And both of these return start time of the current transact

Re: [GENERAL] PostgreSQL scalability concerns

2006-03-16 Thread Robert Treat
On Wednesday 15 March 2006 18:14, Alen Garia - IT wrote: > Hi, > > We are currently planning the deployment of our next generation > enterprise database and we are wondering whether or not PostgreSQL could do > the heavy lifting that would be required. My post is a little bit long but > I hope i

Re: [GENERAL] Relation 'pg_largeobject' does not exist

2006-03-16 Thread Brandon Keepers
On Tue, 2006-03-14 at 23:09 -0500, Tom Lane wrote: > 7.0 sets the lock table size to 64 * max_connections, so if you can > crank max_connections up to 300 or so you should be able to dump. > I think this will work ... it's definitely worth a shot before you > start thinking about hacking the code.

Re: [GENERAL] Replication & web apps

2006-03-16 Thread Brad Nicholson
Jeff Amiel wrote: > There are other techniques to balance the load of the database calls so > that some go to one box and some to others, yet keep the data in synch... > Continuent makes a commercial p/cluster product as well as an open > source product called Sequoia that sit in the JDBC layer a

[GENERAL] will slony work for this ?

2006-03-16 Thread Tony Caduto
I have two Postgresql 8.1 servers each one is in a DMZ and each one has a apache server running on it. What I want to do is have real time 2 way replication between the two databases so I can use DNS fail over, i.e when the primary goes down the secondary would take over. Then when the primary

Re: [GENERAL] will slony work for this ?

2006-03-16 Thread Joshua D. Drake
Tony Caduto wrote: I have two Postgresql 8.1 servers each one is in a DMZ and each one has a apache server running on it. What I want to do is have real time 2 way replication between the two databases so I can use DNS fail over, i.e when the primary goes down the secondary would take over. T

Re: [GENERAL] Replication & web apps

2006-03-16 Thread Scott Marlowe
On Thu, 2006-03-16 at 13:18, Brad Nicholson wrote: > Jeff Amiel wrote: > > > There are other techniques to balance the load of the database calls so > > that some go to one box and some to others, yet keep the data in synch... > > Continuent makes a commercial p/cluster product as well as an open

Re: [GENERAL] ERROR: FULL JOIN is only supported with merge-joinable join conditions

2006-03-16 Thread Stephen Frost
* Harco de Hilster ([EMAIL PROTECTED]) wrote: > ERROR: FULL JOIN is only supported with merge-joinable join conditions I'm not a big fan of that error either, honestly. > select * > from A > full outer join B on A.f1 = B.f1 and ((A.ExpTime IS NULL AND B.ExpTime > IS NULL) OR (A.ModTime <= B.E

Re: [GENERAL] How do I make a timestamp column default to current time

2006-03-16 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: >> mycol timestamp default now() >> or >> mycol timestamp default current_timestamp > And both of these return start time of the current transaction, yes? > Is it the case that there is no SQL-standard way to get the current > time? AFAIK the spec d

Re: [GENERAL] Error I don't understand, losing synch with server

2006-03-16 Thread Tom Lane
Scott Ribe <[EMAIL PROTECTED]> writes: > Every once in a while I log this error executing a query: > message contents do not agree with length in message type "D" > lost synchronization with server: got message type "O", length 1398030676 This means either that libpq got a corrupt message from the

[GENERAL] Disabling persistent connections?

2006-03-16 Thread CSN
I have a setup (Lighttpd + Mongrel + Ruby on Rails) that seems to be using persistent connection, yet I don't see any config setting in any of their configs to disable it. One of the culprits (likely Mongrel) is keeping postgres connections around, eventually hitting postgres' max connections limit

Re: [GENERAL] Error I don't understand, losing synch with server

2006-03-16 Thread Scott Ribe
> This means either that libpq got a corrupt message from the server, or > that libpq itself contains a bug in message parsing. Given that no one > else has reported similar problems, the idea that your app is somehow > clobbering the libpq message buffer (and thus corrupting the message "in > tra

Re: [GENERAL] PostgreSQL Knowledge Base

2006-03-16 Thread Nikolay Samokhvalov
On 3/15/06, Stephen Slezak <[EMAIL PROTECTED]> wrote: > In the interim period while a central PostgreSQL community knowledge base is > being put together, Pervasive Software is opening up access to our PostgreSQL > Knowledge Base ( http://www.pervasivepostgres.com/instantkb13/). Any > interested

Re: [GENERAL] picking the correct locale when doing initdb

2006-03-16 Thread Tomi NA
On 3/16/06, Harald Armin Massa <[EMAIL PROTECTED]> wrote: on bugs Magnus wrote:> It's a matter of picking the correct locale when you initdb your database.and he is PERFECTLY right. Getting the locale wrong while doing intidb can really screw up ones day. But: because of initdb being at the very

[GENERAL] pg_dumpall: permission denied for relation pg_shadow

2006-03-16 Thread CSN
I tried using pg_dumpall and got this error: pg_dumpall: query failed: ERROR: permission denied for relation pg_shadow pg_dumpall: query was: SELECT usename, usesysid, passwd, usecreatedb, usesuper, valuntil, (usesysid = (SELECT datdba FROM pg_database WHERE datname = 'template0')) AS clusterowne

Re: [GENERAL] Disability the trigger

2006-03-16 Thread Tomi NA
On 3/13/06, Claudio Tognolo <[EMAIL PROTECTED]> wrote: I can disable the Trigger?I'd like to know how this could be done, as well. What I really need is a hold-off-all-triggers-untill-I-tell-you-to command, but hey, making a trigger just not fire and vice versa would also be nice. :) Tomislav

Re: [GENERAL] PostgreSQL Knowledge Base

2006-03-16 Thread Joshua D. Drake
Nikolay Samokhvalov wrote: On 3/15/06, Stephen Slezak <[EMAIL PROTECTED]> wrote: In the interim period while a central PostgreSQL community knowledge base is being put together, Pervasive Software is opening up access to our PostgreSQL Knowledge Base ( http://www.pervasivepostgres.com/insta

Re: [GENERAL] PostgreSQL Knowledge Base

2006-03-16 Thread Stephen Slezak
lol Long story a redesign is in the works Steve -Original Message- From: Joshua D. Drake [mailto:[EMAIL PROTECTED] Sent: Thursday, March 16, 2006 11:06 PM To: [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org; Stephen Slezak Subject: Re: [GENERAL] PostgreSQL Knowledge Base Nikolay

[GENERAL] About index for temporay table in a plpgsql function

2006-03-16 Thread Emi Lu
Hello, A question about index for temporary table. Postgresql 8.0.1, in a pl/pgsql function: begin ... -- Part I create temporal table t1 as ((select ... from .. left join . where ... ) union (select .. from ... left join ... where ... )); create index idx_t1_cols on t1(col1, col2) tables

Re: [GENERAL] Relation 'pg_largeobject' does not exist

2006-03-16 Thread Brandon Keepers
If it makes a difference, when I un-tar the dump file from each failed dump, it always has 2937 files in it. I tried this using an old copy of the data directory that had significantly less blobs in it and got the same result. On 3/16/06, Brandon Keepers <[EMAIL PROTECTED]> wrote: > That didn't s

Re: [GENERAL] About index for temporay table in a plpgsql function

2006-03-16 Thread Tony Caduto
Emi Lu wrote: The temporary table will be dropped automatically at the end of the function, right? A temp table will be dropped at the end of the connection. You can reuse it by adding ON COMMIT DELETE ROWS and then check if it exists in your function with this other function: http://www

Re: [GENERAL] pg_dumpall: permission denied for relation pg_shadow

2006-03-16 Thread Tom Lane
CSN <[EMAIL PROTECTED]> writes: > I tried using pg_dumpall and got this error: > pg_dumpall: query failed: ERROR: permission denied > for relation pg_shadow You really need to run that as superuser. regards, tom lane ---(end of broadcast)-

[GENERAL] Constraint Question

2006-03-16 Thread Kai Hessing
Hi Folks, I'm not perfekt in SQL so I'm not really sure, how this can be done. I have a master table stud containing (amongs others) two rows called 'sid' and 'status'. Now I have different tables using constraints to reference this table. For example I have one table called phon with the rows 'p

[GENERAL] pregunta de principiante

2006-03-16 Thread Ing. Claudio Roberto Seu
Instale Postgres 8.1 en un servidor Windows 2000 prof, para probarlo. La instalacion aparentemente se realizo exitosamente, pude levantar el servidor, entrar con el pgadminIII crear una base de datos llamada PRUEBA sin ningun inconveniente. Luego he creado una tabla llamada clientes con dos

[GENERAL] SSL or other libraries for Windows-to-Linux PostgreSQL connection?

2006-03-16 Thread Bart Golda
Hi, I posted almost similar question before, but my idea about the problem has changed so it makes a new problem. So I create a new thread :) Windows machines do not want to connect to a Linux PostgreSQL server 8.1, works only trust authentication for them. I saw an old 7.2 server, it had the sam

Re: [GENERAL] \copy combine with SELECT

2006-03-16 Thread Chris
jia ding wrote: yes, of couse COPY but, => copy test to 'test.txt'; ERROR: must be superuser to COPY to or from a file HINT: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone. Straight from the documentation: Do not confuse COPY with the psql instruction \

Re: [GENERAL] will slony work for this ?

2006-03-16 Thread Robert Treat
On Thursday 16 March 2006 14:46, Joshua D. Drake wrote: > Tony Caduto wrote: > > I have two Postgresql 8.1 servers each one is in a DMZ and each one > > has a apache server running on it. > > What I want to do is have real time 2 way replication between the two > > databases so I can use DNS fail o

Re: [GENERAL] picking the correct locale when doing initdb

2006-03-16 Thread Greg Stark
"Tomi NA" <[EMAIL PROTECTED]> writes: > Here's an idea: let's make the locale a table-level setting, settable at > table creation time so that it's concievable to use postgresql to build, > say, a turist information site supporting english, german, spanish and > italian at the same time. Which l

Re: [GENERAL] full text indexing

2006-03-16 Thread Chris
Oleg Bartunov wrote: On Wed, 15 Mar 2006, chris smith wrote: Hi all, Just wondering which full text module is better & what the differences are between tsearch and fti ? if you need online indexing and linguistic support (dictionaries, stop words, ranking) tsearch2 is fine. If your data are

Re: [GENERAL] How do I make a timestamp column default to current time

2006-03-16 Thread Bruce Momjian
Tom Lane wrote: > "John D. Burger" <[EMAIL PROTECTED]> writes: > >> mycol timestamp default now() > >> or > >> mycol timestamp default current_timestamp > > > And both of these return start time of the current transaction, yes? > > Is it the case that there is no SQL-standard way to get the curr

Re: [GENERAL] Replication & web apps

2006-03-16 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (Leonardo Francalanci) wrote: > In other words: how can asynchronous replication be used in an > application??? Yes, this is an issue. Asynchronous replication is NOT suitable in cases where you point applications that need forcibly up-to-date infor

Re: [GENERAL] full text indexing

2006-03-16 Thread Oleg Bartunov
Chris, try REL8_1_STABLE branch, because you save a lot of time of indexing Oleg On Fri, 17 Mar 2006, Chris wrote: Oleg Bartunov wrote: On Wed, 15 Mar 2006, chris smith wrote: Hi all, Just wondering which full text module is better & what the differences are between tsearch and fti ? if

Re: [GENERAL] catch SELECT statement return

2006-03-16 Thread Bruno Wolff III
On Thu, Mar 16, 2006 at 10:31:54 +1100, Chris <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >i am working on this postgresql statement. it picks up all non-null > >values only. is there a way to pickup all hour values (if any hour > >value not existing, still find them and assign their

[GENERAL] Slow trigger on identical DB but different machine

2006-03-16 Thread Etienne Labuschagne
Hi all, I have the exact same DB on two machines. One is a RedHat box with a SAN for storage. The other is a Windows XP laptop. The RedHat box outperforms the laptop with everything (as expected) except with a DELETE FROM query (quite unexpected). After doing a EXPLAIN ANALYZE, it seems that a