[GENERAL] Is this the warning message I should pay attention on it, during table partition

2010-02-01 Thread Yan Cheng Cheok
I am implementing table partition. -- There is reason behind why we do not want to use trigger technique for table unit. -- Please refer to : http://archives.postgresql.org/pgsql-general/2010-01/msg01184.php -- INSERT INTO unit(fk_lot_id, cycle) -- VALUES(_lotID, _cycle) RETURNIN

[GENERAL] Use Trigger to Remove Table itself when there is no row after delete

2010-02-01 Thread Yan Cheng Cheok
May I know how I can use trigger technique, to remove the table itself, when after delete operation, there is 0 row in the table? Thanks and Regards Yan Cheng CHEOK -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.p

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Greg Smith
Christine Penner wrote: I'm having trouble getting a connection to Postgres to work from outside of my local network. It was working fine at one point. Then I had to change IP addresses and I can't get it to work. This is what I've done. On the computer with Postgres installed I have this in

[GENERAL] reducing result set of tsvector @@ tsquery avoiding to use ts_rank

2010-02-01 Thread Ivan Sergio Borgonovo
I've finally made some fruitful steps in writing C functions that manipulate tsvectors. I'd like to build up a simple system based on ts_rank to find similarities between documents. I've some documents containing 4 parts. I build a tsvector the "usual way" setweight(tsvector(field1), 'A') | set

Re: [GENERAL] statement_timeout problem

2010-02-01 Thread Tom Lane
"Hardwick, Joe" writes: > I have a problem with fetching from cursors sometimes taking an > extremely long time to run. I am attempting to use the > statement_timeout parameter to limit the runtime on these. > PostgreSQL 8.2.4 > Linux 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 13:44:07 EST 2007 i686 i68

Re: [GENERAL] Locking referenced table when creating and dropping tables with foreign key constraints

2010-02-01 Thread Tom Lane
frank joerdens writes: > It seems that whenever I create a new empty table with a foreign key > constraint, the transaction will acquire an exclusive lock on the > referenced table, locking out other writers (not sure if even readers > as well), and I don't quite see why that is necessary It invo

[GENERAL] statement_timeout problem

2010-02-01 Thread Hardwick, Joe
Somehow my previous message got grouped into the Amazon EC2 thread.. I have a problem with fetching from cursors sometimes taking an extremely long time to run. I am attempting to use the statement_timeout parameter to limit the runtime on these. PostgreSQL 8.2.4 Linux 2.6.22.14-72.fc6 #1 SMP W

Re: [GENERAL] combine SQL SELECT statements into one

2010-02-01 Thread Chris . Ellis
> > -Original Message- > > From: chris.el...@shropshire.gov.uk > > [mailto:chris.el...@shropshire.gov.uk] > > Sent: Monday, February 01, 2010 4:08 AM > > To: neilst...@yahoo.com > > Cc: pgsql-general@postgresql.org > > Subject: Re: combine SQL SELECT statements into one > > > > > > Hi

Re: [GENERAL] combine SQL SELECT statements into one

2010-02-01 Thread Scott Marlowe
On Mon, Feb 1, 2010 at 12:09 PM, Igor Neyman wrote: > Original poster asked for the sql that will touch inventory table only > once. > > Your statement (with 3 subqueries) will do it 3 times. I'm pretty sure that starting with 8.3 the engine will collapse all those into one seq scan internally.

[GENERAL] Locking referenced table when creating and dropping tables with foreign key constraints

2010-02-01 Thread frank joerdens
It seems that whenever I create a new empty table with a foreign key constraint, the transaction will acquire an exclusive lock on the referenced table, locking out other writers (not sure if even readers as well), and I don't quite see why that is necessary if the new entity does not contain any r

Re: [GENERAL] combine SQL SELECT statements into one

2010-02-01 Thread Igor Neyman
> -Original Message- > From: chris.el...@shropshire.gov.uk > [mailto:chris.el...@shropshire.gov.uk] > Sent: Monday, February 01, 2010 4:08 AM > To: neilst...@yahoo.com > Cc: pgsql-general@postgresql.org > Subject: Re: combine SQL SELECT statements into one > > > Hi > > pgsql-genera

Re: [GENERAL] How Copy from a view to CSV file

2010-02-01 Thread Andreas Kretschmer
Greg Smith wrote: >> I think postgresql doesn't allow to copy from view to csv directly. Do >> i have to create a temp table from the view and then copy that data to >> the csv file?? > > Right, you can only COPY directly from a table, not a view. But you can > copy out anything you can sel

Re: [GENERAL] How Copy from a view to CSV file

2010-02-01 Thread Greg Smith
Vijay Sharma wrote: I want to copy view's data into a .CSV file. But postgresql is generating an error as ERROR: cannot copy from view 'myview' I am executing the command COPY temp_error_view TO '/tmp/tempError.csv' USING DELIMITERS ',' WITH CSV ; I think postgresql doesn't allow to copy

[GENERAL] How Copy from a view to CSV file

2010-02-01 Thread Vijay Sharma
I want to copy view's data into a .CSV file. But postgresql is generating an error as ERROR: cannot copy from view 'myview' I am executing the command COPY temp_error_view TO '/tmp/tempError.csv' USING DELIMITERS ',' WITH CSV ; I think postgresql doesn't allow to copy from view to csv directly

[GENERAL] How Copy from a view to CSV file

2010-02-01 Thread Vijay Sharma
I want to copy view's data into a .CSV file. But postgresql is generating an error as ERROR: cannot copy from view 'myview' I am executing the command COPY temp_error_view TO '/tmp/tempError.csv' USING DELIMITERS ',' WITH CSV ; I think postgresql doesn't allow to copy from view to csv directly

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Chris Barnes
Telnet is usually installed by default on windows or unix box, telnet to the database box should work. telnet 207.6.93.IP 5432 should work Make sure that windows firewall and antivirus software firewall are temporarily disabled to test. > Date: Mon, 1 Feb 2010 09:49:49

Re: [GENERAL] Possible to set postgres in case insensitive mode ?

2010-02-01 Thread David Fetter
On Mon, Feb 01, 2010 at 07:35:45PM +0200, Moe wrote: > On Sat, Jan 30, 2010 at 4:44 AM, Scott Marlowe wrote: > > > On Fri, Jan 29, 2010 at 7:40 PM, Scott Marlowe > > wrote: > > > On Fri, Jan 29, 2010 at 2:52 PM, Moe > > wrote: > > >> Is it possible to set postgres in case insensitive mode ? > >

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Christine Penner
I set up port forwarding. I assume that means all IP addresses using port 5432 will be sent to my laptop (that Postgres is running on). I don't remember setting up permissions for a specific IP in the router but it was a while ago so I could be wrong. When I get home I will have another look at

Re: [GENERAL] Possible to set postgres in case insensitive mode ?

2010-02-01 Thread Moe
On Sat, Jan 30, 2010 at 4:44 AM, Scott Marlowe wrote: > On Fri, Jan 29, 2010 at 7:40 PM, Scott Marlowe > wrote: > > On Fri, Jan 29, 2010 at 2:52 PM, Moe > wrote: > >> Is it possible to set postgres in case insensitive mode ? > >> > >> If so, how? > > > > What part, exactly, do you want to be cas

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Adrian Klaver
On 02/01/2010 09:16 AM, Christine Penner wrote: When we try to connect we don't get a specific error, just that it can't connect. I'm not sure what logs to look in or on what end. Christine Logging is set up in postgresql.conf per the comments in the file and for more information: http://

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Roderick A. Anderson
Christine Penner wrote: Hi, I'm having trouble getting a connection to Postgres to work from outside of my local network. It was working fine at one point. Then I had to change IP addresses and I can't get it to work. This is what I've done. On the computer with Postgres installed I have thi

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Chris Barnes
You should be able to telnet to the port and get a response back as in the exmple below. Of course substitude the ip for the database. [postg...@pgprd01 londiste]$ telnet 127.0.0.1 5432 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. > Date: M

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Christine Penner
When we try to connect we don't get a specific error, just that it can't connect. I'm not sure what logs to look in or on what end. Christine At 09:13 AM 01/02/2010, you wrote: On 02/01/2010 09:10 AM, Christine Penner wrote: I have re started the computer (a few times) since I did all that.

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Adrian Klaver
On 02/01/2010 09:10 AM, Christine Penner wrote: I have re started the computer (a few times) since I did all that. Christine What is the error that you are seeing on the client and in the logs? -- Adrian Klaver adrian.kla...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Christine Penner
I have re started the computer (a few times) since I did all that. Christine At 09:08 AM 01/02/2010, you wrote: On 02/01/2010 08:36 AM, Christine Penner wrote: Hi, I'm having trouble getting a connection to Postgres to work from outside of my local network. It was working fine at one point. T

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Rodrigo Gonzalez
Did you reload postgres configuration after changing pg_hba.conf? On Mon, 2010-02-01 at 08:36 -0800, Christine Penner wrote: > Hi, > > I'm having trouble getting a connection to Postgres to work from > outside of my local network. It was working fine at one point. Then I > had to change IP add

Re: [GENERAL] Connect to Postgres problems

2010-02-01 Thread Adrian Klaver
On 02/01/2010 08:36 AM, Christine Penner wrote: Hi, I'm having trouble getting a connection to Postgres to work from outside of my local network. It was working fine at one point. Then I had to change IP addresses and I can't get it to work. This is what I've done. On the computer with Postgres

[GENERAL] Connect to Postgres problems

2010-02-01 Thread Christine Penner
Hi, I'm having trouble getting a connection to Postgres to work from outside of my local network. It was working fine at one point. Then I had to change IP addresses and I can't get it to work. This is what I've done. On the computer with Postgres installed I have this in the pg_hba.conf file

Re: [GENERAL] How to test my new install

2010-02-01 Thread JOSE GREGORIO PAREDES ODAR
Señores, Saquen me de la lista ya no deceo resibir mas correos. atte. Jose Paredes Odar Jòse > From: r...@aarden.us > To: r...@iol.ie > CC: pgsql-general@postgresql.org > Subject: Re: [GENERAL] How to test my new install > Date: Mon, 1 Feb 2010 04:48:08 -0600 > > Raymond,

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-01 Thread Alvaro Herrera
dipti shah escribió: > Thanks Richard. those chapters are very useful. I got to know most of > concepts but didn't find the location of pg_hba.conf file so that I can > verify it. I have connected to my database using "postgres" user. Could you > tell me how to open pg_hba.conf file? Run this:

Re: [GENERAL] Another PANIC corrupt index/crash ...any thoughts?

2010-02-01 Thread Scott Marlowe
On Mon, Feb 1, 2010 at 7:45 AM, Jeff Amiel wrote: > About a month ago I posted about a database crash possibly caused by corrupt > index.. > Coincidentally (or not) started getting disk errors about a minute AFTER the > above error (db storage is on a fibre attached SAN) Not likely a coincidenc

Re: [GENERAL] Another PANIC corrupt index/crash ...any thoughts?

2010-02-01 Thread Scott Marlowe
On Mon, Feb 1, 2010 at 7:45 AM, Jeff Amiel wrote: >  I have no real evidence of bad disks...iostat -E reports: Note that on a SAN you're not likely to see anything in iostat that says "bad disk block" since the SAN is hiding all that from you and presenting all the disks in it as one big disk, an

Re: [GENERAL] Can LISTEN/NOTIFY deal with more than 100 every second?

2010-02-01 Thread Yeb Havinga
Gavin Mu wrote: CREATE OR REPLACE RULE send_notify AS ON INSERT TO log DO ALSO NOTIFY logevent; .. when I use 3 similar programs to feed data, which means about 75 events every second, I found that Postgres didn't send NOTIFY opportunely, since the client do SELECT query every several hundre

[GENERAL] Another PANIC corrupt index/crash ...any thoughts?

2010-02-01 Thread Jeff Amiel
About a month ago I posted about a database crash possibly caused by corrupt index.. Dec 30 17:41:57 db-1 postgres[28957]: [ID 748848 local0.crit] [34004622-1] 2009-12-30 17:41:57.825 CST28957PANIC: right sibling 2019 of block 2018 is not next child of 1937 in index "sl_log_2_idx1" Has si

Re: [GENERAL] Versions RSS page is missing version(s)

2010-02-01 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 >> I'm not sure how useful that is. Surely while we encourage people to run >> a recent major version, we also want to encourage people who will not >> or cannot

Re: [GENERAL] Can LISTEN/NOTIFY deal with more than 100 every second?

2010-02-01 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > I am prototyping a system which sends all INSERT/UPDATE/DELETE events > to a third party software, I do:

Re: [GENERAL] How to test my new install

2010-02-01 Thread ray joseph
Raymond, Thank you very much. This is exactly what I was looking for. I'll jump right into it. Ray - Original Message - From: "Raymond O'Donnell" To: "ray joseph" Cc: Sent: Monday, February 01, 2010 7:08 AM Subject: Re: [GENERAL] How to test my new install > On 01/02/2010 12:21, r

Re: [GENERAL] How to test my new install

2010-02-01 Thread Raymond O'Donnell
On 01/02/2010 12:21, ray joseph wrote: > Raymond, > > Thank you. Yes, that sounds like a great step. I am new to this so I could > use a little help: What do you mean to connect to it and how would I do it? psql is the command-line client for Postgres, which lets you connect to databases and r

Re: [GENERAL] How to test my new install

2010-02-01 Thread Sam Mason
On Mon, Feb 01, 2010 at 06:21:55AM -0600, ray joseph wrote: > I am new to this so I could > use a little help: What do you mean to connect to it and how would I do it? I'd have a flick through the manual if I were you; the following is a reasonable place to start: http://www.postgresql.org/doc

Re: [GENERAL] How to test my new install

2010-02-01 Thread ray joseph
Raymond, Thank you. Yes, that sounds like a great step. I am new to this so I could use a little help: What do you mean to connect to it and how would I do it? Ray - Original Message - From: "Raymond O'Donnell" To: "ray joseph" Cc: Sent: Monday, February 01, 2010 6:17 AM Subject:

Re: [GENERAL] Can LISTEN/NOTIFY deal with more than 100 every second?

2010-02-01 Thread Yeb Havinga
Gavin Mu wrote: CREATE OR REPLACE RULE send_notify AS ON INSERT TO log DO ALSO NOTIFY logevent; .. when I use 3 similar programs to feed data, which means about 75 events every second, I found that Postgres didn't send NOTIFY opportunely, since the client do SELECT query every several hundre

Re: [GENERAL] How to test my new install

2010-02-01 Thread Raymond O'Donnell
On 01/02/2010 10:48, ray joseph wrote: > Raymond, > > Thank you for responding to my question. I am sorry that I wasn't clear. > > My concern is that when I start up my tool stack and it doesn't work, that I > will have an entire chain to troubleshoot. If I could isolate each tool as > I instal

Re: [GENERAL] combine SQL SELECT statements into one

2010-02-01 Thread Sam Mason
On Sun, Jan 31, 2010 at 11:36:55PM -0800, Neil Stlyz wrote: > SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-02-01'; > SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-01-20'; > SELECT COUNT(distinct model) FROM inventory WHERE modified >= '2010-01-01'; > > A

[GENERAL] Unusual table size and very slow inserts

2010-02-01 Thread Ivano Luberti
Hello, I have a software that uses Posgtres 8.4.2 on Windows. I have a database with data splitted into schemas, so that every schema replicates the same set of tables. One of the table is called "code": it has 16 columns, almos all numerics except for a carachtervarying(1024) and two text fields.

Re: [GENERAL] How to test my new install

2010-02-01 Thread ray joseph
Raymond, Thank you for responding to my question. I am sorry that I wasn't clear. My concern is that when I start up my tool stack and it doesn't work, that I will have an entire chain to troubleshoot. If I could isolate each tool as I install it, and validate that it is working, it will be eas

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-01 Thread Richard Huxton
On 01/02/10 10:24, dipti shah wrote: Thanks Richard. those chapters are very useful. I got to know most of concepts but didn't find the location of pg_hba.conf file so that I can verify it. I have connected to my database using "postgres" user. Could you tell me how to open pg_hba.conf file? It

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-01 Thread dipti shah
Thanks Richard. those chapters are very useful. I got to know most of concepts but didn't find the location of pg_hba.conf file so that I can verify it. I have connected to my database using "postgres" user. Could you tell me how to open pg_hba.conf file? Thanks. On Mon, Feb 1, 2010 at 3:06 PM, R

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-01 Thread Richard Huxton
On 01/02/10 07:35, dipti shah wrote: Moreover, anyone can connect to databases as postgres user without giving password. I am not aware how above setup has been made but I want to get rid of them. Could anyone please help me in below questions? You'll want to read Chapter 19 of the manuals fo

Re: [GENERAL] How to test my new install

2010-02-01 Thread Raymond O'Donnell
On 01/02/2010 01:15, ray wrote: > I have just installed 8.4 on an XP. My intent is to use it with Trac > and Apache. > > I would like to validate the installation of pgsql. What would be a > good method to make sure that pgsql is in there right? Not sure what you mean. I'd imagine the thing

Re: [GENERAL] combine SQL SELECT statements into one

2010-02-01 Thread Chris . Ellis
Hi pgsql-general-ow...@postgresql.org wrote on 02/01/2010 07:36:55 AM: > Good Evening, Good Morning Wherever you are whenever you may be reading this. > > snip > > count1 | count2 | count3 > --- > 2 2 4 > > Can this be done wi

Re: [GENERAL] combine SQL SELECT statements into one

2010-02-01 Thread Florent THOMAS
Hi, If I were you, I worked like this. First make a union of those three query Then make a crosstab : http://www.postgresonline.com/journal/index.php?/archives/14-CrossTab-Queries-in-PostgreSQL-using-tablefunc-contrib.html documented here : http://www.postgresql.org/docs/8.4/interactive/tablefunc

[GENERAL] combine SQL SELECT statements into one

2010-02-01 Thread Neil Stlyz
Good Evening, Good Morning Wherever you are whenever you may be reading this. I am new to this email group and have some good experience with SQL and PostgreSQL database. I am currently working on a PHP / PostgreSQL project and I came upon something I could not figure out in SQL. I was wonderi

[GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-01 Thread dipti shah
Hi, we have latest PostGreSQL setup and it allows everyone to connect. When I do \du, it gives following output and it is same for all users. TechDB=# \du List of roles Role name | Superuser | Create role | Create DB | Connections | Member of ---

Re: [GENERAL] Which version will this run on?

2010-02-01 Thread Mads Lie Jensen
On Sun, 31 Jan 2010 16:11:46 -0500, t...@sss.pgh.pa.us (Tom Lane) wrote: >A quick test says that it works back to 7.4, which is the oldest >version that is supported at all anymore. I don't think you need >to worry too much. Thank you for the answer. Had it worked on just any 8.x-version, I woul