Re: [GENERAL] How to create tsvector_update_trigger on Non-character type data

2009-10-13 Thread Christophe Pettus
On Oct 13, 2009, at 11:21 PM, Gaini Rajeshwar wrote: doc_id -- Name of the column. It's data type is integer The strict error message is correct: The full-text search feature of PostgreSQL can only index text strings, and doc_id (as an integer) is not a text string. What precisely are yo

Re: [GENERAL] Cannot start the postgres service

2009-10-13 Thread Scott Marlowe
On Tue, Oct 13, 2009 at 11:24 PM, Craig Ringer wrote: > > A better question might by "why on earth are you messing about with the > data directory when you don't understand what it does and how it works?". Not that anyone wants to discourage exploring. It's just there are better ways to go about

[GENERAL] How to create tsvector_update_trigger on Non-character type data

2009-10-13 Thread Gaini Rajeshwar
Hi, How can we create tsvector update trigger on Non-character data type. For example, i have created a ts vector trigger something like this. *CREATE TRIGGER tr_doc_id_col BEFORE INSERT OR UPDATE ON document FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('tsv_doc_id', 'pg_catalog.english'

Re: [GENERAL] Cannot start the postgres service

2009-10-13 Thread Craig Ringer
On 13/10/2009 2:59 PM, Mitesh51 wrote: > > Yeah... > > My query is...Is it the reason y postgres stops working?? (Moving files from > pg_xlog) pg_xlog contains transaction logs. These aren't "log files" in the sense of text logs designed for the administrator to use. They're part of the critical

Re: [GENERAL] Current state of XML capabilities in PostgreSQL?

2009-10-13 Thread Tim Landscheidt
Grzegorz Jaśkiewicz wrote: >> why would you store data thats wrapped in two copies of its fieldname along >> with other punctuation?    wouldn't it make more sense to decompose your XML >> source into proper tables so proper indexes and relational sql queries can >> be made?     otherwise, every

Re: [GENERAL] Procedure for feature requests?

2009-10-13 Thread Tim Landscheidt
Sam Mason wrote: >> >> "generate_series(A, B, C)" can also >> >> be written as "A + generate_series(0, (C - B) / C) * C" >> > >> > If you can figure out the limit then it seems easy, >> > though I'm not sure how you'd do that. >> What limit? > Sorry, I was calling the second parameter to genera

Re: [GENERAL] Query to find contiguous ranges on a column

2009-10-13 Thread Thomas Kellerer
Peter Hunsberger wrote on 13.10.2009 23:23: I need a query to find the contiguous ranges within this column, in this case returning the result set: start, end 2, 5 11, 19 23, 23 32, 37 I have one solution that joins the table against itself and does (among other things) a subselect looking "not

Re: [GENERAL] Query to find contiguous ranges on a column

2009-10-13 Thread Tim Landscheidt
Peter Hunsberger wrote: > [...] > I have one solution that joins the table against itself and does > (among other things) a subselect looking "not exists col +1" and "not > exists col -1" on the two instances of the table to find the start and > end. This is, as you might guess, is not very effi

[GENERAL] Query to find contiguous ranges on a column

2009-10-13 Thread Peter Hunsberger
Given a column of data resembling the following: col 2 3 4 5 11 12 13 14 15 16 17 18 19 23 32 33 34 35 36 37 I need a query to find the contiguous ranges within this column, in this case returning the result set: start, end 2, 5 11, 19 23, 23 32, 37 I have one solution that joins the table agai

Re: [GENERAL] How to deactivate FK's to reorder fields in table?

2009-10-13 Thread Raymond O'Donnell
On 13/10/2009 20:17, Andre Lopes wrote: > I need to reorder fields in one table. But the database don't let me do this > action because the FK's pointing to the table. How can I deactivate the > FK's? You can't reorder columns in PostgreSQL, so I'm guessing that you're trying to drop and re-creat

[GENERAL] SFPUG: Video from "Statistics and Postgres — How the Planner Sees Your Data"

2009-10-13 Thread Christophe Pettus
Hi, The video from "Statistics and Postgres — How the Planner Sees Your Data," the September 8, 2009 meeting of the SFPUG, is now available on- line: http://thebuild.com/blog/2009/10/13/sfpug-statistics-and-postgres/ It's uploading to Vimeo now, so it should be available there short

Re: [GENERAL] Possible encoding issue (win7)

2009-10-13 Thread gmb
Seems all that was necessary was a restart of the server :( ...wish I hadn't spend the whole day on this -- 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] How to deactivate FK's to reorder fields in table?

2009-10-13 Thread Andreas Kretschmer
Andre Lopes wrote: > Hi, > > I need to reorder fields in one table. Not possible. Use a select-list instead of 'select *' to achieve this. > But the database don't let me do this > action because the FK's pointing to the table. How can I deactivate the FK's? You can't reorder the fields, use

[GENERAL] How to deactivate FK's to reorder fields in table?

2009-10-13 Thread Andre Lopes
Hi, I need to reorder fields in one table. But the database don't let me do this action because the FK's pointing to the table. How can I deactivate the FK's? Best Regards, André.

[GENERAL] PG 8.4 and pg_autovacuum functionality

2009-10-13 Thread Marcelo
Hello, Since pg_autovacuum no longer exits on PG 8.4 and it seems that one now needs to provide the storage parameters during CREATE TABLE or later on with an ALTER TABLE. Will that ALTER TABLE block anything going on that table until it's finished ? I assume not since no table data is actu

Re: [GENERAL] Possible encoding issue (win7)

2009-10-13 Thread gmb
Thank for the quick response Tom > If the message is spelled exactly that way then it's not coming from > anything in the standard Postgres distribution --- we might say > "invalid encoding name "something"" but there's noplace that would > put a reference to PGCLIENTENCODING in the middle.  I inf

Re: [GENERAL] Possible encoding issue (win7)

2009-10-13 Thread Tom Lane
gmb writes: > Using a Delphi app with ZEOS components to connect to server (on > localhost) and get this message: > SQL Error: invalid encoding name in PGCLIENTENCODING: WIN1252 > (Running Windows 7 (64x), postgres 8.3.7) If the message is spelled exactly that way then it's not coming from anythi

[GENERAL] Possible encoding issue (win7)

2009-10-13 Thread gmb
Hi Using a Delphi app with ZEOS components to connect to server (on localhost) and get this message: SQL Error: invalid encoding name in PGCLIENTENCODING: WIN1252 (Running Windows 7 (64x), postgres 8.3.7) Initially I installed with server and client encoding as WIN1252. But since I got the error

Re: [GENERAL] Best data type to use for sales tax percent

2009-10-13 Thread Peter Geoghegan
> For general-purpose sales-tax...in the United States...for the time being. > > I believe the current tax on new vehicles in Israel is 70+% and seem to > recall that it was well over 100% at one time. Sales taxes already vary by > product (in California, food is 0% for example) as well as state, c

Re: [GENERAL] Best data type to use for sales tax percent

2009-10-13 Thread Steve Crawford
Christophe Pettus wrote: On Oct 10, 2009, at 3:33 AM, Jasen Betts wrote: CREATE DOMAN sales_tax_rate AS DECIMAL CHECK (VALUE >= 0 AND VALUE <=1); why the latter check ( VALUE <=1 )? Since this version has no scale on the DECIMAL, the second check keeps it from being larger than 1.0, since

[GENERAL] JMS question

2009-10-13 Thread Peter
Has anyone done anything to integrate (any) JMS client with Postgres? Google tells me nothing. If not, I see there are JMS servers that use PG as the backend. Any chance of piggybacking on that? Eg could use triggers as 'message listeners' and insert into JMS table could trigger sending a new

Re: [GENERAL] tar error while running basebackup

2009-10-13 Thread Andre Brandt
How can this happen? I always thought, that, when in backup mode, nothing is able to change the database - so the database files shouldn't change. Can autovaccumdb cause the changes? pg_start_backup() doesn't tell the database to stop writing changes to disk; it essentially just says "

Re: [GENERAL] tar error while running basebackup

2009-10-13 Thread Joshua Tolley
On Tue, Oct 13, 2009 at 12:40:37PM +0200, Andre Brandt wrote: > tar: ./base/208106/209062: File shrank by 262144 bytes; padding with zeros > tar: ./base/208106/210576: file changed as we read it > tar: ./base/208106/210577: file changed as we read it > tar: ./base/208106/210431: file changed as we

Re: [GENERAL] tar error while running basebackup

2009-10-13 Thread Glyn Astill
> From: Andre Brandt > Subject: [GENERAL] tar error while running basebackup > To: pgsql-general@postgresql.org > Date: Tuesday, 13 October, 2009, 11:40 AM > Hi! > > We're using two backup strategies to get consistent backups > of our postgresql databases. First, we create a complete > dump every

[GENERAL] tar error while running basebackup

2009-10-13 Thread Andre Brandt
Hi! We're using two backup strategies to get consistent backups of our postgresql databases. First, we create a complete dump every night by running pg_dump, zipping the file and writing this backup on tape. Second, we create a basebackup every saturday. To create a basebackup, we run pg_start

Re: [GENERAL] Cannot start the postgres service

2009-10-13 Thread Mitesh51
Yeah... My query is...Is it the reason y postgres stops working?? (Moving files from pg_xlog) John R Pierce wrote: > > Mitesh51 wrote: >> If I move any file from the \PostgreSQL\8.4\data\pg_xlog\ then postgres >> services are stopped & I cannot start them. I need to reinstall the >> postgres. >

[GENERAL] "Large object (lo)" and PostgreSQL 8.4

2009-10-13 Thread gerhard . lutz
Hello, I've got an installation problem with the contrib module "Large object (lo)" and PostgreSQL 8.4. I hope this is the correct mailing list for that. I'm sorry if not. I want to adapt the installation routines of my Windows application to PostgreSQL 8.4. In earlier versions of PostgreSQL I w

Re: [GENERAL] [HACKERS] contrib/plantuner - enable PostgreSQL planner hints

2009-10-13 Thread Scott Marlowe
On Mon, Oct 12, 2009 at 9:20 AM, Hans-Juergen Schoenig -- PostgreSQL wrote: > if there was a vote whether this should be in contrib or in core: +999 from > me ... Well, contrib is a good place to start. It sets a clearly defined ownership / maintenance person, and if the core of pgsql changes,

Re: [GENERAL] Cannot start the postgres service

2009-10-13 Thread Scott Marlowe
On Tue, Oct 13, 2009 at 12:14 AM, John R Pierce wrote: > Mitesh51 wrote: >> >> If I move any file from the \PostgreSQL\8.4\data\pg_xlog\ then postgres >> services are stopped & I cannot start them. I need to reinstall the >> postgres. >> > > > well, then don't move any file from pg_xlog while post