Re: [GENERAL] Combine psql command with shell script

2009-03-10 Thread A. Kretschmer
In response to John Wang : > > How to combine psql commands, such as "\copy", with shell script? Is there > any sample code? For example, I have 10 tables and want to user the "\copy" > command to import data from 10 different text files. I can execute the > "\copy" command 10 times. But it is

Re: [GENERAL] Combine psql command with shell script

2009-03-10 Thread John R Pierce
John Wang wrote: How to combine psql commands, such as "\copy", with shell script? Is there any sample code? For example, I have 10 tables and want to user the "\copy" command to import data from 10 different text files. I can execute the "\copy" command 10 times. But it is not convenient.

[GENERAL] Combine psql command with shell script

2009-03-10 Thread John Wang
How to combine psql commands, such as "\copy", with shell script? Is there any sample code? For example, I have 10 tables and want to user the "\copy" command to import data from 10 different text files. I can execute the "\copy" command 10 times. But it is not convenient. Thanks. --

[GENERAL] ERROR: table row type and query-specified row type do not match

2009-03-10 Thread Joseph S
After adding a date column to a table, I started getting these errors from my triggers: ERROR: table row type and query-specified row type do not match DETAIL: Query has too few columns. The triggers just did simple UPDATEs on table2 when table1 was updated/inserted A db restart solved the

[GENERAL] I don't want to back up index files

2009-03-10 Thread Glen Parker
I am wondering the feasibility of having PG continue to work even if non-essential indexes are gone or corrupt. I brought this basic concept up at some point in the past, but now I have a different motivation, so I want to strike up discussion about it again. This time around, I simply don't

[GENERAL] I don't want to back up index files

2009-03-10 Thread Glen Parker
I am wondering the feasibility of having PG continue to work even if non-essential indexes are gone or corrupt. I brought this basic concept up at some point in the past, but now I have a different motivation, so I want to strike up discussion about it again. This time around, I simply don't wan

Re: [GENERAL] Enable user access from remote host

2009-03-10 Thread Adrian Klaver
On Tuesday 10 March 2009 4:36:36 pm Piotre Ugrumov wrote: > On 9 Mar, 02:22, t...@sss.pgh.pa.us (Tom Lane) wrote: > > John R Pierce writes: > > > Tom Lane wrote: > > >> A more accurate statement is that it's trustworthy to the extent that > > >> you trust the owner of the other machine to be runni

Re: [GENERAL] Enable user access from remote host

2009-03-10 Thread Piotre Ugrumov
On 9 Mar, 02:22, t...@sss.pgh.pa.us (Tom Lane) wrote: > John R Pierce writes: > > > Tom Lane wrote: > >> A more accurate statement is that it's trustworthy to the extent that > >> you trust the owner of the other machine to be running a non-broken > >> identd daemon.  Within a LAN it might be perf

Re: [GENERAL] tsearch2 dictionary for statute cites

2009-03-10 Thread Tom Lane
"Kevin Grittner" writes: > People are likely to search for statute cites, which tend to have a > hierarchical form. I'm not sure the prefix approach will work for > this. For example, there is a section 939.64 in the state statutes > dealing with commission of a crime while wearing a bulletproof

Re: [GENERAL] pg_toast_temp_xx AND pg_temp_xx SCHEMAS

2009-03-10 Thread Tom Lane
Vyacheslav Kalinin writes: >> They're just there to hold temporary tables (so that the names of such >> tables don't conflict with any non-temporary tables). The reason they >> seem to accumulate is we only create one when needed, and there's one >> for each concurrently executing backend if it c

Re: [GENERAL] panic: index siblings mismatch

2009-03-10 Thread Scott Marlowe
On Tue, Mar 10, 2009 at 3:35 PM, Gerd König wrote: > Hello, > > today I recognized an error while playing with pgpool-II 2.1 and > postgresql 8.3.5 (on 64bit linux). > I really don't know if the error is caused by pgpool or if it's > postgresql-related...?!? > any hints are much appreciated, since

[GENERAL] tsearch2 dictionary for statute cites

2009-03-10 Thread Kevin Grittner
I broached this topic last year[1], but the project got tabled until now; so I raise it again. We want to be able to search text (extracted from character-based PDF files) which will contain legal terms and statute cites, and we want to be able to do tsearch2 searches (under 8.3.recent). It's cle

[GENERAL] panic: index siblings mismatch

2009-03-10 Thread Gerd König
Hello, today I recognized an error while playing with pgpool-II 2.1 and postgresql 8.3.5 (on 64bit linux). I really don't know if the error is caused by pgpool or if it's postgresql-related...?!? There are up to 200 active connections in parallel and thereby sometimes high load (with high write:r

Re: [GENERAL] pg_toast_temp_xx AND pg_temp_xx SCHEMAS

2009-03-10 Thread Vyacheslav Kalinin
> They're just there to hold temporary tables (so that the names of such > tables don't conflict with any non-temporary tables). The reason they > seem to accumulate is we only create one when needed, and there's one > for each concurrently executing backend if it creates any temp tables. Hm, do

Re: [GENERAL] Include script within a script

2009-03-10 Thread Andreas Kretschmer
Bill Todd wrote: > Is there any mechanism to include (call) one SQL script file from another? You can use \i Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would rec

[GENERAL] Include script within a script

2009-03-10 Thread Bill Todd
Is there any mechanism to include (call) one SQL script file from another? Bill -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] pg_toast_temp_xx AND pg_temp_xx SCHEMAS

2009-03-10 Thread Fernando Hevia
> -Mensaje original- > De: Tom Lane [mailto:t...@sss.pgh.pa.us] > > ... and there's one for each concurrently > executing backend if it creates any temp tables. > That explains the growth I noticed as backends have been incremented recently. Thanks!! -- Sent via pgsql-general mai

Re: [GENERAL] pg_toast_temp_xx AND pg_temp_xx SCHEMAS

2009-03-10 Thread Tom Lane
"Fernando Hevia" writes: > Could anyone point me out some documentation about what these schemas mean? They're just there to hold temporary tables (so that the names of such tables don't conflict with any non-temporary tables). The reason they seem to accumulate is we only create one when needed

[GENERAL] pg_toast_temp_xx AND pg_temp_xx SCHEMAS

2009-03-10 Thread Fernando Hevia
Hi guys, In one of my databases (8.3.6) I have around 25 schemas with names like these. There seem to appear a couple of new ones every now and then. The only reference I found was this: --- http://www.postgresql.org/docs/8.3/static/release-8-3.html * Place temporary tables' TOAST tables in s

Re: [GENERAL] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Ivan Sergio Borgonovo
On Tue, 10 Mar 2009 13:12:03 -0400 Tom Lane wrote: > Ivan Sergio Borgonovo writes: > > I get a > > Query failed: ERROR: permission denied for schema user_test > > CONTEXT: SQL statement "UPDATE ONLY > > "user_test"."shop_commerce_baskets" SET "sid" = NULL WHERE > > $1::pg_catalog.text OPERATOR(p

Re: [GENERAL] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Andreas Wenk
Tom Lane schrieb: Ivan Sergio Borgonovo writes: I get a Query failed: ERROR: permission denied for schema user_test CONTEXT: SQL statement "UPDATE ONLY "user_test"."shop_commerce_baskets" SET "sid" = NULL WHERE $1::pg_catalog.text OPERATOR(pg_catalog.=) "sid"::pg_catalog.text This query is

Re: [GENERAL] [SOLVED] 8.3.6 build error on Debian Lenny

2009-03-10 Thread Josh Trutwin
On Tue, 10 Mar 2009 12:37:21 + Gregory Stark wrote: > Searching on google it seems this is a typical error message when > you have a hand-compiled gmp installed locally in /usr/local/lib as > well as a system gmp installed in /usr/lib. So you may be getting > one version of libmpfr and a mism

Re: [GENERAL] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Tom Lane
Ivan Sergio Borgonovo writes: > I get a > Query failed: ERROR: permission denied for schema user_test CONTEXT: > SQL statement "UPDATE ONLY "user_test"."shop_commerce_baskets" SET > "sid" = NULL WHERE $1::pg_catalog.text OPERATOR(pg_catalog.=) > "sid"::pg_catalog.text > This query is run when I d

Re: [GENERAL] upgrade from 7.4 to 8.3

2009-03-10 Thread Karsten Hilbert
On Tue, Mar 10, 2009 at 05:02:59PM +0100, Marc Cuypers wrote: > Is it possible to upgrade from 7.4 to 8.3 at once? > > I upgraded as follows: > when 7.4 was installed i dumped the data with: > su postgres -c "pg_dumpall --create" > out Just a side note in case you didn't know: It is usually

Re: [GENERAL] upgrade from 7.4 to 8.3

2009-03-10 Thread Tom Lane
Marc Cuypers writes: > Databases in 7.4 were encoded as utf-8. Now when importing postgresql > gives the following error: > ERROR: encoding UTF8 does not match server's locale en_US > DETAIL: The server's LC_CTYPE setting requires encoding LATIN1. It looks like you need to run initdb with LA

[GENERAL] upgrade from 7.4 to 8.3

2009-03-10 Thread Marc Cuypers
Hi, I've just upgrade postgresql from 7.4 to 8.3 on a machine running debian. And i ran in trouble. I've searched the internet but didn't find an answer to my solution. Is it possible to upgrade from 7.4 to 8.3 at once? I upgraded as follows: when 7.4 was installed i dumped the data with:

Re: [GENERAL] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Andreas Wenk
Ivan Sergio Borgonovo schrieb: On Tue, 10 Mar 2009 14:31:56 +0100 Andreas Wenk wrote: which rights does the actual user have for the schema user_test? > Query failed: ERROR: permission denied for schema user_test > CONTEXT: I think the user does not have the rights for the schema ... I j

Re: [GENERAL] postgresql and LDAP

2009-03-10 Thread JP Fletcher
FYI, I did see the message returned to my client, and did look in the server logs. Trouble was, the message in the log was no more helpful than the one returned to my client, with the exception of pointing me to the line number in pg_hba.conf. Gregory Stark wrote: Tom Lane writes: JP F

Re: [GENERAL] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Ivan Sergio Borgonovo
On Tue, 10 Mar 2009 14:31:56 +0100 Andreas Wenk wrote: > which rights does the actual user have for the schema user_test? > > > Query failed: ERROR: permission denied for schema user_test > > CONTEXT: > > I think the user does not have the rights for the schema ... I just run http://pgedit.c

Re: [GENERAL] postgresql and LDAP

2009-03-10 Thread Gregory Stark
Emanuel Calvo Franco writes: > 2009/3/10 Gregory Stark : >> Tom Lane writes: >>> However, a tip that might help is that there should be more information >>> about the problem in the postmaster log.  We intentionally don't send >>> details about the conf file's contents to the client... >> >> Per

Re: [GENERAL] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Andreas Wenk
Ivan Sergio Borgonovo schrieb: I get a Query failed: ERROR: permission denied for schema user_test CONTEXT: SQL statement "UPDATE ONLY "user_test"."shop_commerce_baskets" SET "sid" = NULL WHERE $1::pg_catalog.text OPERATOR(pg_catalog.=) "sid"::pg_catalog.text This query is run when I do a DEL

Re: [GENERAL] postgresql and LDAP

2009-03-10 Thread Emanuel Calvo Franco
2009/3/10 Gregory Stark : > Tom Lane writes: > >> JP Fletcher writes: >>> I've just compiled 8.3.6 with ldap support yet I get >>> 'FATAL:  missing or erroneous pg_hba.conf file' >>> when I try to connect. >> >> Can't help you much when you don't show us the pg_hba.conf file ;-) >> >> However, a

Re: [GENERAL] intermittant performance problem

2009-03-10 Thread Mike Charnoky
Gregory Stark wrote: Tom Lane writes: Mike Charnoky writes: The sampling query which runs really slow on some days looks something like this: INSERT INTO sampled_data (item_name, timestmp, ... ) SELECT item_name, timestmp, ... ) FROM raw_data WHERE timestmp >= ? and timestmp < ?

Re: [GENERAL] 8.3.6 build error on Debian Lenny

2009-03-10 Thread Gregory Stark
Josh Trutwin writes: > On Tue, 10 Mar 2009 00:49:32 -0400 > Tom Lane wrote: > >> Josh Trutwin writes: > > > >> > geo_ops.c /usr/lib/gcc/i486-linux-gnu/4.3.2/cc1: symbol lookup >> > error: /usr/lib/libmpfr.so.1: undefined symbol: >> > __gmp_get_memory_functions >> >> [ blink... ] There's no r

[GENERAL] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Ivan Sergio Borgonovo
I get a Query failed: ERROR: permission denied for schema user_test CONTEXT: SQL statement "UPDATE ONLY "user_test"."shop_commerce_baskets" SET "sid" = NULL WHERE $1::pg_catalog.text OPERATOR(pg_catalog.=) "sid"::pg_catalog.text This query is run when I do a DELETE FROM user_test.sessions WHERE t

Re: [GENERAL] postgresql and LDAP

2009-03-10 Thread Gregory Stark
Tom Lane writes: > JP Fletcher writes: >> I've just compiled 8.3.6 with ldap support yet I get >> 'FATAL: missing or erroneous pg_hba.conf file' >> when I try to connect. > > Can't help you much when you don't show us the pg_hba.conf file ;-) > > However, a tip that might help is that there sh

Re: [GENERAL] intermittant performance problem

2009-03-10 Thread Gregory Stark
Tom Lane writes: > Mike Charnoky writes: >> The sampling query which runs really slow on some days looks something >> like this: > >> INSERT INTO sampled_data >>(item_name, timestmp, ... ) >>SELECT item_name, timestmp, ... ) >>FROM raw_data >>WHERE timestmp >= ? and timestmp < ?

Re: [GENERAL] [ADMIN] How to Convert VarChar to Date in PgSQL

2009-03-10 Thread Pavel Stehule
2009/3/10 Jaume Sabater : > On Tue, Mar 10, 2009 at 1:07 PM, Venkat Rao Tammineni > wrote: > >>   I have one table which has lot of data.In the same table I have one >> varchar filed. I want to convert into Date data type? Is It possible to >> convert varchar to date datatype with out loosing data

Re: [GENERAL] How to Convert VarChar to Date in PgSQL

2009-03-10 Thread Pavel Stehule
hello 2009/3/10 Venkat Rao Tammineni : > Dear All, > > > > > >   I have one table which has lot of data.In the same table I have one > varchar filed. I want to convert into Date data type? Is It possible to > convert varchar to date datatype with out loosing data.Please guide me.I am > waiting for

Re: [GENERAL] How to Convert VarChar to Date in PgSQL

2009-03-10 Thread A. Kretschmer
In response to Venkat Rao Tammineni : > Dear All, > > > > > > I have one table which has lot of data.In the same table I have one varchar > filed. I want to convert into Date data type? Is It possible to convert > varchar > to date datatype with out loosing data.Please guide me.I am waiti

Re: [GENERAL] [ADMIN] How to Convert VarChar to Date in PgSQL

2009-03-10 Thread Jaume Sabater
On Tue, Mar 10, 2009 at 1:07 PM, Venkat Rao Tammineni wrote: >   I have one table which has lot of data.In the same table I have one > varchar filed. I want to convert into Date data type? Is It possible to > convert varchar to date datatype with out loosing data.Please guide me.I am > waiting fo

Re: [GENERAL] How to Convert VarChar to Date in PgSQL

2009-03-10 Thread Raymond O'Donnell
On 10/03/2009 12:07, Venkat Rao Tammineni wrote: > I have one table which has lot of data.In the same table I have one > varchar filed. I want to convert into Date data type? Is It possible to > convert varchar to date datatype with out loosing data.Please guide me.I am > waiting for your great r

[GENERAL] How to Convert VarChar to Date in PgSQL

2009-03-10 Thread Venkat Rao Tammineni
Dear All, I have one table which has lot of data.In the same table I have one varchar filed. I want to convert into Date data type? Is It possible to convert varchar to date datatype with out loosing data.Please guide me.I am waiting for your great response. ?Thanx & Regards Ve

Re: [GENERAL] PostgreSQL connect error

2009-03-10 Thread devi
Hi Richard, Thanks & it works.. DEVI.G - Original Message - From: "Richard Huxton" To: "devi" Cc: ; Sent: Tuesday, March 10, 2009 3:39 PM Subject: Re: [GENERAL] PostgreSQL connect error devi wrote: Hi , As john suggested, i tried setting up the env .. but that dosen't help out.

Re: [GENERAL] (problem with) encoding of (early-in-connect) PostgreSQL messages

2009-03-10 Thread Karsten Hilbert
Is there any chance of this being considered for 8.4 ? Unfortunately I cannot provide patches myself as my knowledge of C is next to nothing. Thanks, Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] PostgreSQL connect error

2009-03-10 Thread Richard Huxton
devi wrote: > Hi , > > As john suggested, i tried setting up the env .. but that dosen't help > out. I tried with IP, instead of localhost in pg_hba.conf.. just trail & > error approach... There is no need to use trial and error - this is covered in the manuals: http://www.postgresql.org/docs/cur

Re: [GENERAL] 8.3.6 build error on Debian Lenny

2009-03-10 Thread Richard Huxton
Josh Trutwin wrote: > > Unfortunately just recently I've also had the same error come up > trying to build php. Something seems goofed up with my build > tools. I wouldn't be surprised if it had kept your old version of gcc etc. in case you needed that specific version for some reason. A quick b

Re: [ADMIN] [GENERAL] postgres deployment

2009-03-10 Thread Scott Marlowe
On Tue, Mar 10, 2009 at 2:57 AM, Nagalingam, Karthikeyan wrote: > Thanks Simon Riggs, I am following the same. > > Can I get some real time backup solution in production. I'm pretty sure that's what Michael Monnerie posted. Those ARE the strategies used in REAL deployments. -- Sent via pgsql-g

Re: [GENERAL] PostgreSQL connect error

2009-03-10 Thread devi
Hi , As john suggested, i tried setting up the env .. but that dosen't help out. I tried with IP, instead of localhost in pg_hba.conf.. just trail & error approach... Now.. i'm getting the error as "FATAL: role "apache" does not exist..".. Can U help me out here!! Thanks DEVI.G - Orig

Re: [GENERAL] PostgreSQL connect error

2009-03-10 Thread Thomas Pundt
devi schrieb: Hi Friends, I wrote a sample php program that connects to PostgreSQL DB. ==> I was able to run the PHP program from the command prompt as postgres user & not as anyother user $ php pgsql.php ==> I was not able execute the same file from the web browser. FATAL ERRO

Re: [GENERAL] postgres deployment

2009-03-10 Thread Nagalingam, Karthikeyan
Thanks Simon Riggs, I am following the same. Can I get some real time backup solution in production. Regards Karthikeyan.N -Original Message- From: Simon Riggs [mailto:si...@2ndquadrant.com] Sent: Tuesday, March 10, 2009 2:25 PM To: Nagalingam, Karthikeyan Cc: pgsql-general@postgr

Re: [GENERAL] postgres deployment

2009-03-10 Thread Simon Riggs
On Tue, 2009-03-10 at 11:17 +0530, Nagalingam, Karthikeyan wrote: >Can I know the effective solution to do the backup and recovery > for Postgres in storage environment. > > Please share Any existing deployment and solution for backup and > recovery for Postgres in storage > > Any su

Re: [GENERAL] PostgreSQL connect error

2009-03-10 Thread John R Pierce
devi wrote: Hi Friends, I wrote a sample php program that connects to PostgreSQL DB. ==> I was able to run the PHP program from the command prompt as postgres user & not as anyother user $ php pgsql.php ==> I was not able execute the same file from the web browser. FATAL ERROR-

[GENERAL] PostgreSQL connect error

2009-03-10 Thread devi
Hi Friends, I wrote a sample php program that connects to PostgreSQL DB. ==> I was able to run the PHP program from the command prompt as postgres user & not as anyother user $ php pgsql.php ==> I was not able execute the same file from the web browser. FATAL ERROR- undefined functio