[GENERAL] Tsearch2 - Error using tsquery object in GROUP BBY queries

2006-12-01 Thread Henrik Zagerholm
Hello list, I've set up tsearch2 to handle full-text searches (obviously :)). I have a problem I can't find a solution to and it feels its tsquery objects fault. The query I'm executing has a GROUP BY clause and because I'm using the headline function I need my tsquery object in the

Re: [GENERAL] Separation of clients' data within a database

2006-12-01 Thread Isak Hansen
On 11/30/06, John McCawley [EMAIL PROTECTED] wrote: I am faced with a very new problem for me, which is that my app is going to be used directly by several companies utilizing one server. (i.e. these companies will be able to go under the hood quite a bit more than we typically allow with this

Re: [GENERAL] Tsearch2 - Error using tsquery object in GROUP BBY

2006-12-01 Thread Teodor Sigaev
The query I'm executing has a GROUP BY clause and because I'm using the headline function I need my tsquery object in the SELECT clause and therefor also in the GROUP BY clause. BUT when executing the query I get the following error. - could not identify an ordering operator for type tsquery

[GENERAL] named cache

2006-12-01 Thread Matthew Peter
Is it possible to put an query result into memory? Like SELECT * from table WHERE [...] CACHE cache_name TIMEOUT '1 hour'::interval; So if cache_name exists with the same SQL statement, the result would be fetched from the cache, refreshing and updating the cache with fresh results when it

Re: [GENERAL] Tsearch2 - Error using tsquery object in GROUP BBY

2006-12-01 Thread Henrik Zagerholm
1 dec 2006 kl. 09:56 skrev Teodor Sigaev: The query I'm executing has a GROUP BY clause and because I'm using the headline function I need my tsquery object in the SELECT clause and therefor also in the GROUP BY clause. BUT when executing the query I get the following error. - could not

Re: [GENERAL] initdb problem on Windows XP Home

2006-12-01 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Hi Again, I posted earlier about a problem installing 8.1.5 on Windows XP Home. THat message was delayed, so it likely will not show up. THe problem is occuring on execution of initdb. I skipped the cluster creation in the installation so that I could run it manually,

Re: [GENERAL] named cache

2006-12-01 Thread Richard Huxton
Matthew Peter wrote: Is it possible to put an query result into memory? Like SELECT * from table WHERE [...] CACHE cache_name TIMEOUT '1 hour'::interval; So if cache_name exists with the same SQL statement, the result would be fetched from the cache, refreshing and updating the cache with

Re: [GENERAL] Separation of clients' data within a database

2006-12-01 Thread Richard Huxton
John McCawley wrote: Of course I still have to modify my web app and schema to facilitate the new security structure, but I was never too worried about handling it in my app...My concern was allowing people direct access to the underlying DB while a) blocking them from viewing others' data,

[GENERAL] Restoring database from files on disk

2006-12-01 Thread veejar
Hello! I had problems with my HDD and i have lost many files. From my pgsql database files I have only base-folder. In this folder one is important database: base/45325101 I reinstall my postgresql-server. I have created new database with same name and have copied all files from my old folder

Re: [GENERAL] named cache

2006-12-01 Thread Willy-Bas Loos
maybe you would find materialized views interesting. http://www.google.com/search?q=materialized+view+postgresql On 12/1/06, Matthew Peter [EMAIL PROTECTED] wrote: Is it possible to put an query result into memory? Like SELECT * from table WHERE [...] CACHE cache_name TIMEOUT '1

[GENERAL] COPY FROM and NULL AS does not work

2006-12-01 Thread Arnaud Lesauvage
HI List, Trying to import data from a text file, with a semicolon as the delimiter, double-quotes as the quoting character. I would like empty strings to be inserted as NULL values in a varchar column. In the text file, they are writen as : some columns;;some columns I tried COPY table

Re: [GENERAL] Restoring database from files on disk

2006-12-01 Thread Richard Huxton
veejar wrote: Hello! I had problems with my HDD and i have lost many files. From my pgsql database files I have only base-folder. In this folder one is important database: base/45325101 How to correct this one database? You can't. You need all the files in data/ - recover the whole cluster

Re: [GENERAL] Tsearch2 - Error using tsquery object in GROUP BBY

2006-12-01 Thread Teodor Sigaev
I'm using 8.1.4 at the moment but I guess I need to update. The 8.2 is looking really promising. So with 8.2 I don't need the subselect? IMHO, don't need headline function is slow enough. You think?! ;) I known :) - computing headline is a hard task -- Teodor Sigaev

Re: [GENERAL] COPY FROM and NULL AS does not work

2006-12-01 Thread Richard Huxton
Arnaud Lesauvage wrote: HI List, Trying to import data from a text file, with a semicolon as the delimiter, double-quotes as the quoting character. I would like empty strings to be inserted as NULL values in a varchar column. In the text file, they are writen as : some columns;;some

Re: [GENERAL] Restoring database from files on disk

2006-12-01 Thread Richard Huxton
veejar wrote: Unfortunately I don't have any other information: dumps, other folders from pgsql root directory. What tools? Start here: http://sources.redhat.com/rhdb/ And you'll want to read and understand the Internals/Physical Storage chapters of the manuals. From past experience

Re: [GENERAL] COPY FROM and NULL AS does not work

2006-12-01 Thread Dimitri Fontaine
Le vendredi 1 décembre 2006 11:28, Arnaud Lesauvage a écrit : HI List, Trying to import data from a text file, with a semicolon as the delimiter, double-quotes as the quoting character. I would like empty strings to be inserted as NULL values in a varchar column. In the text file, they

Re: [GENERAL] sudden drop in delete performance

2006-12-01 Thread surabhi.ahuja
after my update I had my entire data drectory PGDATA removed, i had done initdb again and did lot of inserts (the inserts have given the similar performance) i then do a remove from the db, which is taking time. when i had postgres 8.0.0 i did not turn fsyn off. that time i had moved the

Re: [GENERAL] Separation of clients' data within a database

2006-12-01 Thread Niklas Johansson
How about this: * Have one master schema that holds all physical tables. This schema is accessible only by the superuser. * Create a schema which contains views that mirror the master schema. This is the schema that the customers connect to, each using a different db role, and since it's

Re: [GENERAL] COPY FROM and NULL AS does not work

2006-12-01 Thread Arnaud Lesauvage
Richard Huxton a écrit : Arnaud Lesauvage wrote: HI List, Trying to import data from a text file, with a semicolon as the delimiter, double-quotes as the quoting character. I would like empty strings to be inserted as NULL values in a varchar column. In the text file, they are writen as :

Re: [GENERAL] PostgreSQL doesn't accept connections when Windows

2006-12-01 Thread George Weaver
From: Jim Nasby Hmm... are you sure there isn't already something listening on port 5435? Hi Jim, How might I determine this? Would this make a difference when the system is rebooted vs manually restarting the server? Thanks, George ---(end of

Re: [GENERAL] PostgreSQL doesn't accept connections when Windows

2006-12-01 Thread Thomas H.
How might I determine this? netstat -a -n this will list you all current listened ports you could also try and telnet localhost 5432 to see if something is listening. Would this make a difference when the system is rebooted vs manually restarting the server? when another program is

Re: [GENERAL] sudden drop in delete performance

2006-12-01 Thread Bill Moran
In response to surabhi.ahuja [EMAIL PROTECTED]: after my update I had my entire data drectory PGDATA removed, i had done initdb again and did lot of inserts (the inserts have given the similar performance) Did you do a VACUUM ANALYZE after loading the new database? Are you sure your

Re: [GENERAL] Separation of clients' data within a database

2006-12-01 Thread John McCawley
That's the first idea I've seen that looks like it might actually work... (Not that the other ideas were bad, but I just couldn't see how I could fit the solutions into my current app) So what would my user setup look like? Would it look something like this: createuser joe grant select on

Re: [GENERAL] initdb problem on Windows XP Home

2006-12-01 Thread adurrant
Hi Richard, Thanks for getting back to me. Yes, I have a postgres limited account that will own the files. (This was the one created by the installer.) In order to ensure the this user has access/full control to C:\Program Files\Postgresql\8.1, I used the cacls command to edit the access

[GENERAL] FK locking still too strong

2006-12-01 Thread Csaba Nagy
Hi all, While postgres 8.x improved a lot the locking issues related to foreign keys, the locking used is still stronger than needed. The following test case deadlocks on postgres but goes through on oracle: preparation of tables: create table test1(col_fk integer primary key, col_1 integer);

Re: [GENERAL] PostgreSQL doesn't accept connections when Windows

2006-12-01 Thread George Weaver
Hi Thomas netstat -a -n Cool! And -o gives me the pid of the process which I can match with processes through the Task Manager... when another program is occupying the port, it would probabyl not make much difference, except if the pgsql service is started before the other tool. maybe

Re: [GENERAL] FK locking still too strong

2006-12-01 Thread Russ Brown
Csaba Nagy wrote: Hi all, While postgres 8.x improved a lot the locking issues related to foreign keys, the locking used is still stronger than needed. The following test case deadlocks on postgres but goes through on oracle: preparation of tables: create table test1(col_fk integer primary

Re: [GENERAL] initdb problem on Windows XP Home

2006-12-01 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Hi Richard, Thanks for getting back to me. Yes, I have a postgres limited account that will own the files. (This was the one created by the installer.) In order to ensure the this user has access/full control to C:\Program Files\Postgresql\8.1, I used the cacls

[GENERAL] Problem with function parameters

2006-12-01 Thread Alejandro Michelin Salomon \( Adinet \)
Hi : I have installed Pg 8.08 I create this function : CREATE OR REPLACE FUNCTION CALCULO_VALOR_LIQUIDO_HELPDESK( nTipoDesconto SMALLINT, nTipoComissao SMALLINT, nDesconto

Re: [GENERAL] PostgreSQL doesn't accept connections when Windows

2006-12-01 Thread Thomas H.
If I understand what you're suggesting, perhaps upon reboot PostgreSQL is starting before another app that listens on the same port, which could cause the problem, but if I then restart the PostgreSQL service this solves the problem? if you can start it manually, then its probably not a

Re: [GENERAL] Problem with function parameters

2006-12-01 Thread Richard Huxton
Alejandro Michelin Salomon ( Adinet ) wrote: Hi : I have installed Pg 8.08 I create this function : CREATE OR REPLACE FUNCTION CALCULO_VALOR_LIQUIDO_HELPDESK( nTipoDesconto SMALLINT, nTipoComissao SMALLINT, When i test this

[GENERAL] transfer just the data directories from linux to windows?

2006-12-01 Thread Anton Melser
Hi, We have some backups from our prod server and I was wondering if there would be any problems with just copying the data directory to a windows install (same version - 8.1.4) ... any pointers? Cheers Antoine ---(end of broadcast)--- TIP 6:

Re: [GENERAL] Separation of clients' data within a database

2006-12-01 Thread Niklas Johansson
On 1 dec 2006, at 15.19, John McCawley wrote: That's the first idea I've seen that looks like it might actually work... (Not that the other ideas were bad, but I just couldn't see how I could fit the solutions into my current app) So what would my user setup look like? Would it look

[GENERAL] 8.1.5 installation problem with initdb on WinXP Home

2006-12-01 Thread adurrant
Hi, I apologize for being yet another noob posting about this problem. I have spent 2 days searching the archives and the net for a solution to no avail. Hence my post here. The problem I am having is on install of 8.1.5 it fails at the initdb call. In checking the log, it seems to fail

Re: [GENERAL] Extract between year *and* month

2006-12-01 Thread Syl
Alban Hertroys wrote: Syl wrote: Try select * from tablename where title like ('%nith%') and date_trunc('month',recall_date::timestamp) = date_trunc('month','1995-01-01'::timestamp) and date_trunc('month',recall_date::timestamp) =

Re: [GENERAL] Create index on array element?

2006-12-01 Thread Dave Bodenstab
Jeff Davis wrote: On Wed, 2006-11-29 at 14:39 -0600, Dave Bodenstab wrote: I guess one cannot create an index on an element of an array? test= create table test ( ordinal int[] ); CREATE TABLE test= create unique index x1 on test ( ordinal[1] ); ERROR: syntax error at or near ) at character

[GENERAL] Data corruption problem...

2006-12-01 Thread Nathan Wilhelmi
Hello - Ran into an interesting problem last week with data unexpectedly being deleted. Has anyone else experienced this and have any suggestions on how to prevent this in the future? Here is the environment: Server: 8.0.3 on Solaris 9 JDBC Driver: 8.0.311 This is the series of statements

[GENERAL] Restore database from files (not dump files)?

2006-12-01 Thread wheel
Can a pgsql 8.1 database be restored from the raw file? For one database I have only the files found in the base folder, example C:\PostgreSQL \data\base\16404, there are many files called 1247, 1248, etc (no extension). I think these are the files that make up the database? For this db I

RES: [GENERAL] Problem with function parameters

2006-12-01 Thread Alejandro Michelin Salomon \( Adinet \)
Richard Huxton wrote: ---Mensagem original- --De: Richard Huxton [mailto:[EMAIL PROTECTED] --Enviada em: sexta-feira, 1 de dezembro de 2006 12:24 --Para: Alejandro Michelin Salomon ( Adinet ) --Cc: Pgsql-General --Assunto: Re: [GENERAL] Problem with function parameters -- -- --Alejandro

Re: [GENERAL] Restore database from files (not dump files)?

2006-12-01 Thread Bruce Momjian
wheel wrote: Can a pgsql 8.1 database be restored from the raw file? For one database I have only the files found in the base folder, example C:\PostgreSQL \data\base\16404, there are many files called 1247, 1248, etc (no extension). I think these are the files that make up the database?

Re: [GENERAL] transfer just the data directories from linux to windows?

2006-12-01 Thread Magnus Hagander
Hi, We have some backups from our prod server and I was wondering if there would be any problems with just copying the data directory to a windows install (same version - 8.1.4) ... any pointers? If both servers are windows servers, and both are running the same version of pg, then you

[GENERAL] porducing documentation from postgres

2006-12-01 Thread Antonios Katsikadamos
Hi all. I have a big .sql file written in postgres and i was wondering if someone knows a tool to produce documentation from postgres. Kind regards, Antonios - Access over 1 million songs - Yahoo! Music Unlimited.

Re: [GENERAL] porducing documentation from postgres

2006-12-01 Thread John DeSoi
On Dec 1, 2006, at 12:36 PM, Antonios Katsikadamos wrote: Hi all. I have a big .sql file written in postgres and i was wondering if someone knows a tool to produce documentation from postgres. http://www.rbt.ca/autodoc/ John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL

Re: [GENERAL] porducing documentation from postgres

2006-12-01 Thread Merlin Moncure
On 12/1/06, John DeSoi [EMAIL PROTECTED] wrote: On Dec 1, 2006, at 12:36 PM, Antonios Katsikadamos wrote: Hi all. I have a big .sql file written in postgres and i was wondering if someone knows a tool to produce documentation from postgres. http://www.rbt.ca/autodoc/ although it's a

Re: [GENERAL] Separation of clients' data within a database

2006-12-01 Thread John McCawley
Oh, I see, so there's one master schema, and one customer schema, and the customer schema views are automatically filtered based on login...Makes sense...I will definitely try to implement this, thanks! Niklas Johansson wrote: On 1 dec 2006, at 15.19, John McCawley wrote: That's the first

Re: [GENERAL] CertFirst Legit?

2006-12-01 Thread Chander Ganesan
Jim Nasby wrote: If you're concerned about them, you might want to just use someone else... I can think of at least 2 other companies that offer training classes. On Nov 27, 2006, at 2:40 PM, [EMAIL PROTECTED] wrote: I've been tasked with administering one of our PostgreSQL databases and

Re: [GENERAL] initdb problem on Windows XP Home

2006-12-01 Thread Shane Ambler
[EMAIL PROTECTED] wrote: (I've discovered this morning that I can boot in safe mode to get the Security tab on folder properties in XP Home. I'll check that this evening to see if it looks correct.) I haven't used XP home much so I'm not certain it is the same - but the security tab is

Re: [GENERAL] Separation of clients' data within a database

2006-12-01 Thread Berend Tober
John McCawley wrote: Oh, I see, so there's one master schema, and one customer schema, and the customer schema views are automatically filtered based on login...Makes sense...I will definitely try to implement this, thanks! I've on-and-off toyed with the idea of accomplishing a similar

[GENERAL] DBI module for postgres 1.4.3

2006-12-01 Thread Jasbinder Singh Bali
Hi I'm using postgresql version 1.4.3. Trying to connect to it throught perl code. Just wondering if DBI would be the best tool to use to accomplish this task. Which version of DBI should I be using. I mean if any one of you could give me exact pointers to it, would be highly appreciated. Thanks,

Re: [GENERAL] DBI module for postgres 1.4.3

2006-12-01 Thread Martijn van Oosterhout
On Fri, Dec 01, 2006 at 02:49:59PM -0500, Jasbinder Singh Bali wrote: Hi I'm using postgresql version 1.4.3. No such version exists. What exactly do you mean? Trying to connect to it throught perl code. Just wondering if DBI would be the best tool to use to accomplish this task. Which

Re: [GENERAL] DBI module for postgres 1.4.3

2006-12-01 Thread Jasbinder Singh Bali
I've downloaded dbd:pg 1.49. Should work? On 12/1/06, Martijn van Oosterhout kleptog@svana.org wrote: On Fri, Dec 01, 2006 at 02:49:59PM -0500, Jasbinder Singh Bali wrote: Hi I'm using postgresql version 1.4.3. No such version exists. What exactly do you mean? Trying to connect to it

Re: [GENERAL] DBI module for postgres 1.4.3

2006-12-01 Thread Joshua D. Drake
On Fri, 2006-12-01 at 21:05 +0100, Martijn van Oosterhout wrote: On Fri, Dec 01, 2006 at 02:49:59PM -0500, Jasbinder Singh Bali wrote: Hi I'm using postgresql version 1.4.3. No such version exists. What exactly do you mean? I am guessing he means DBD::Pg 1.4.3 to PostgreSQL version

Re: [GENERAL] DBI module for postgres 1.4.3

2006-12-01 Thread Jasbinder Singh Bali
Oops my bad. That 1.4.3 was pgadmin versioin actually. Sorry about that On 12/1/06, Joshua D. Drake [EMAIL PROTECTED] wrote: On Fri, 2006-12-01 at 21:05 +0100, Martijn van Oosterhout wrote: On Fri, Dec 01, 2006 at 02:49:59PM -0500, Jasbinder Singh Bali wrote: Hi I'm using postgresql

Re: [GENERAL] CertFirst Legit?

2006-12-01 Thread adam
I'm looking at taking this course. The Illinois location is about 30 min from my home. No one else has taken this course? Original Message Subject: Re: [GENERAL] CertFirst Legit?From: Jim Nasby [EMAIL PROTECTED]Date: Thu, November 30, 2006 2:34 pmTo: [EMAIL PROTECTED]Cc:

[GENERAL] best way to setup raid array in this situation

2006-12-01 Thread Derrick Stensrud
We have a server with 6 32GB SCSI drives and we are thinking about setting up 4 drives in RAID 10 for the database itself and using the other 2 drives in RAID 1 for the WAL and OS. Is this a good idea or can anyone think of a better idea other than this? Thanks.

[GENERAL] Unsuccessful SIGINT

2006-12-01 Thread Brian Wipf
I have a connection that I am unable to kill with a sigint. ps auxww for the process in question: postgres 3578 0.3 3.6 6526396 1213344 ? SDec01 0:32 postgres: postgres ssprod 192.168.0.52(49333) SELECT and gdb shows: (gdb) bt #0 0x2ba62c18f085 in send () from

Re: [GENERAL] Unsuccessful SIGINT

2006-12-01 Thread Brian Wipf
Sorry, I forgot to mention this is on PostgreSQL 8.1.5. The server is SUSE Linux 10.1, the client is OS X Server 10.4.8. On 1-Dec-06, at 5:42 PM, Brian Wipf wrote: I have a connection that I am unable to kill with a sigint. ps auxww for the process in question: postgres 3578 0.3 3.6

Re: [GENERAL] Unsuccessful SIGINT - More Info

2006-12-01 Thread Brian Wipf
Based on the backend_start time in pg_stat_activity, I was able to find the problem query in our logs. The query is a simple one, but returns a lot of results for a report. This was the error in the logs: org.postgresql.util.PSQLException: Ran out of memory retrieving query results.

Re: [GENERAL] initdb problem on Windows XP Home

2006-12-01 Thread adurrant
Hi, I gave restricted permissions to the postgres user on the C: drive. After doing this, I could run initdb without issue. Something doesn't sit right with me with giving access to C: drive, but it works. If anyone has any insights on what this problem is/was and how I can get around it

Re: [GENERAL] Unsuccessful SIGINT - More Info

2006-12-01 Thread Brian Wipf
I finally reboot the client server. It took a couple of minutes after that, but the hung connection did go away on the server. I found a similar cause to my problem in the archives: http://archives.postgresql.org/pgsql-jdbc/2005-05/msg00044.php In order for the PostgreSQL JDBC adaptor to not

Re: [GENERAL] initdb problem on Windows XP Home

2006-12-01 Thread adurrant
Hi Richard, Some more information tonight. I logged in under safe mode and checked the security settings for C:\Program Files\PostgreSQL and the user postgres had full control. However, I could not issue a cd C:\Program Files\PostgreSQL. I looked at the security for Program Files, and

Re: [GENERAL] initdb problem on Windows XP Home

2006-12-01 Thread adurrant
Hi Shane, Thanks for the tip. I think be default XP Home has simple file sharing enabled, and there is no way to turn it off. The only way to access the security tab is to log in under Safe Mode. Thanks again. Alex. [EMAIL PROTECTED] wrote: (I've discovered this morning that I can boot

Re: [GENERAL] initdb problem on Windows XP Home

2006-12-01 Thread Shane Ambler
[EMAIL PROTECTED] wrote: Hi, I gave restricted permissions to the postgres user on the C: drive. After doing this, I could run initdb without issue. Something doesn't sit right with me with giving access to C: drive, but it works. If anyone has any insights on what this problem is/was and