[GENERAL] Mapping Java BigDecimal

2010-01-18 Thread Jakub Bednář
Hi All, We decide add support PostgreSQL database (now supporting only Oracle database) to our product. In Oracle we mapping Java BigDecimal to number(19, 2), in PostgreSQL to numeric(19, 2). If I store to BigDecimal column number without decimal, e.g. 3, than Oracle JDBC driver return 3,

[GENERAL] does ispell have allaffixes set to on?

2010-01-18 Thread Brian
I was testing the ispell text search dictionary and it appears to be behaving as if the ispell option allaffixes was set to on. This wasn't the case for the original tsearch2 contrib module, and for the ispell program itself which defaults to off. So for example, if I create a simple

Re: [GENERAL] Incorrect FTS query results with GIN index

2010-01-18 Thread Teodor Sigaev
Basically, I started testing prefix matching in FTS and got into troubles. Self-contained example follows: Thank you, fixed. The reason was in incorrect optimization of GIN scan: GIN reuses scan result for equals key, but comparison of key didn't take into account a difference of scan's

Re: [GENERAL] Incorrect FTS query results with GIN index

2010-01-18 Thread Vyacheslav Kalinin
Great, thank you! I assume this one goes into 8.4.3, right? 2010/1/18 Teodor Sigaev teo...@sigaev.ru Basically, I started testing prefix matching in FTS and got into troubles. Self-contained example follows: Thank you, fixed. The reason was in incorrect optimization of GIN scan: GIN reuses

Re: [GENERAL] Incorrect FTS query results with GIN index

2010-01-18 Thread Teodor Sigaev
Great, thank you! I assume this one goes into 8.4.3, right? Yeah, or apply patch http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/ginscan.c?r1=1.25r2=1.26 -- Teodor Sigaev E-mail: teo...@sigaev.ru

Re: [GENERAL] postgres external table

2010-01-18 Thread Greg Smith
Craig Ringer wrote: For those non-Oracle users among us, what's an external table? External tables let you map a text file directly to a table without explicitly loading it. In PostgreSQL, if you have data in a CSV file, usually you'd import it with COPY before you'd use it. If external

Re: [GENERAL] postgres external table

2010-01-18 Thread Tom Lane
Greg Smith g...@2ndquadrant.com writes: Craig Ringer wrote: For those non-Oracle users among us, what's an external table? External tables let you map a text file directly to a table without explicitly loading it. In PostgreSQL, if you have data in a CSV file, usually you'd import it with

Re: [GENERAL] postgres external table

2010-01-18 Thread Sam Mason
On Mon, Jan 18, 2010 at 09:57:02AM -0500, Tom Lane wrote: Greg Smith g...@2ndquadrant.com writes: Craig Ringer wrote: For those non-Oracle users among us, what's an external table? External tables let you map a text file directly to a table without explicitly loading it. In

Re: [GENERAL] postgres external table

2010-01-18 Thread Greg Stark
On Mon, Jan 18, 2010 at 2:57 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'm finding it hard to visualize a use-case for that.  We must postulate that the table is so big that you don't want to import it, and yet you don't feel a need to have any index on it.  Which among other things implies that

[GENERAL] Tamaño de campo

2010-01-18 Thread atbrkt
Hola Me gustaría saber si es posible devolver el tamaño de un campo de una determinada tabla. Es decir, si yo defino por ejemplo un campo de tipo character varying (8), sería posible devolver el número 8?? o en su defecto el número de bytes máximo de ese campo?? Saludos

Re: [GENERAL] postgres external table

2010-01-18 Thread Scott Marlowe
On Mon, Jan 18, 2010 at 7:57 AM, Tom Lane t...@sss.pgh.pa.us wrote: Greg Smith g...@2ndquadrant.com writes: Craig Ringer wrote: For those non-Oracle users among us, what's an external table? External tables let you map a text file directly to a table without explicitly loading it.  In

Re: [GENERAL] postgres external table

2010-01-18 Thread Greg Smith
Tom Lane wrote: I'm finding it hard to visualize a use-case for that. We must postulate that the table is so big that you don't want to import it, and yet you don't feel a need to have any index on it. Which among other things implies that every query will seqscan the whole table. Where's the

Re: [GENERAL] postgres external table

2010-01-18 Thread Vincenzo Romano
2010/1/18 Tom Lane t...@sss.pgh.pa.us: Greg Smith g...@2ndquadrant.com writes: Craig Ringer wrote: For those non-Oracle users among us, what's an external table? External tables let you map a text file directly to a table without explicitly loading it.  In PostgreSQL, if you have data in a

Re: [GENERAL] Collate order on Mac OS X, text with diacritics in UTF-8

2010-01-18 Thread Martin Flahault
Very interesting discussion indeed. It seems that Postgresql:The world's most advanced open source database can not work properly on Mac OS X: the world's most advanced operating system and FreeBSD. Don't you think postgresql.org should remove from their download page the links to FreeBSD

[GENERAL] number of page slots needed (1576544) exceeds max_fsm_pages (204800)]

2010-01-18 Thread Reid Thompson
Does this max_fsm_pages value seem OK for a 46GB database? I've clustered all the tables that seemed to be exhibiting large amounts of bloat. reporting=# SELECT pg_size_pretty(pg_database_size('reporting')); pg_size_pretty 46 GB (1 row) NOTICE: number of page slots

[GENERAL] PostreSQL PostgreSQL 8.1.18 and Tsearch2 context error

2010-01-18 Thread Rodrigo Valdenegro
Hi guys, I'm working with full-text search on my project, however i'm receiving an Config file error: 7 ERROR: no tsearch config CONTEXT message but i don't know what it means. The entire error message received is: SQLSTATE[F]: Config file error: 7 ERROR: no tsearch config CONTEXT: SQL

[GENERAL] Updating from a column

2010-01-18 Thread Bob Pawley
Hi I have a table that has one column (pump1) controlled by a dbcheckbox. The values can be True, False or null. I want to insert a row of values into second table when column pump1 value is 'True'. I don't want the trigger to insert a row when other columns of the first table are updated or

Re: [GENERAL] number of page slots needed (1576544) exceeds max_fsm_pages (204800)]

2010-01-18 Thread Vick Khera
On Mon, Jan 18, 2010 at 1:47 PM, Reid Thompson reid.thomp...@ateb.com wrote: Does this max_fsm_pages value seem OK for a 46GB database? I've clustered all the tables that seemed to be exhibiting large amounts of bloat. My big DB is about 70 on disk. I have fsm pages set to 3.4 million, and

Re: [GENERAL] number of page slots needed (1576544) exceeds max_fsm_pages (204800)]

2010-01-18 Thread Reid Thompson
On Mon, Jan 18, 2010 at 02:43:11PM -0500, Vick Khera wrote: On Mon, Jan 18, 2010 at 1:47 PM, Reid Thompson reid.thomp...@ateb.com wrote: Does this max_fsm_pages value seem OK for a 46GB database? I've clustered all the tables that seemed to be exhibiting large amounts of bloat. One

[GENERAL] Equivalent of mysql type mediablob in postgres?

2010-01-18 Thread Chris Barnes
I would like to move a table that is used to store images from mysql to postgres. The only stumbling I may encounter, may be switching from mysql blob to something in postgres. We store chart images in a mysql medium blob type. How can I store these in postgres? Chris |

Re: [GENERAL] Equivalent of mysql type mediablob in postgres?

2010-01-18 Thread Thomas Kellerer
Chris Barnes wrote on 18.01.2010 21:05: I would like to move a table that is used to store images from mysql to postgres. The only stumbling I may encounter, may be switching from mysql blob to something in postgres. We store chart images in a mysql medium blob type. How can I store these in

Re: [GENERAL] Updating from a column

2010-01-18 Thread Adrian Klaver
On Monday 18 January 2010 11:31:57 am Bob Pawley wrote: Hi I have a table that has one column (pump1) controlled by a dbcheckbox. The values can be True, False or null. I want to insert a row of values into second table when column pump1 value is 'True'. I don't want the trigger to insert a

[GENERAL] type of field

2010-01-18 Thread Jean-Yves F. Barbier
Hi list, I've got to store many small videos; to make things simple (backup/restore, because users don't know very much about IT) I've choosen BYTEA + EXTERNAL, is it the right choice? JY -- Wait for that wisest of all counselors, Time. -- Pericles -- Sent via pgsql-general mailing list

Re: [GENERAL] type of field

2010-01-18 Thread Greg Stark
On Mon, Jan 18, 2010 at 8:24 PM, Jean-Yves F. Barbier 12u...@gmail.com wrote: I've got to store many small videos; to make things simple (backup/restore, because users don't know very much about IT) I've choosen BYTEA + EXTERNAL, is it the right choice? If you want to store them in the

[GENERAL] data dump help

2010-01-18 Thread Terry
Hello, Sorry for the poor subject. Not sure how to describe what I need here. I have an application that logs to a single table in pgsql. In order for me to get into our log management, I need to dump it out to a file on a periodic basis to get new logs. I am not sure how to tackle this. I

Re: [GENERAL] type of field

2010-01-18 Thread Jean-Yves F. Barbier
Greg Stark a écrit : On Mon, Jan 18, 2010 at 8:24 PM, Jean-Yves F. Barbier 12u...@gmail.com wrote: I've got to store many small videos; to make things simple (backup/restore, because users don't know very much about IT) I've choosen BYTEA + EXTERNAL, is it the right choice? If you want to

Re: [GENERAL] data dump help

2010-01-18 Thread Andy Colson
On 1/18/2010 4:08 PM, Terry wrote: Hello, Sorry for the poor subject. Not sure how to describe what I need here. I have an application that logs to a single table in pgsql. In order for me to get into our log management, I need to dump it out to a file on a periodic basis to get new logs. I

Re: [GENERAL] data dump help

2010-01-18 Thread Terry
On Mon, Jan 18, 2010 at 4:48 PM, Andy Colson a...@squeakycode.net wrote: On 1/18/2010 4:08 PM, Terry wrote: Hello, Sorry for the poor subject.  Not sure how to describe what I need here.  I have an application that logs to a single table in pgsql. In order for me to get into our log

Re: [GENERAL] data dump help

2010-01-18 Thread Terry
On Mon, Jan 18, 2010 at 5:07 PM, Terry td3...@gmail.com wrote: On Mon, Jan 18, 2010 at 4:48 PM, Andy Colson a...@squeakycode.net wrote: On 1/18/2010 4:08 PM, Terry wrote: Hello, Sorry for the poor subject.  Not sure how to describe what I need here.  I have an application that logs to a

Re: [GENERAL] number of page slots needed (1576544) exceeds max_fsm_pages (204800)]

2010-01-18 Thread Scott Marlowe
On Mon, Jan 18, 2010 at 12:43 PM, Vick Khera vi...@khera.org wrote: On Mon, Jan 18, 2010 at 1:47 PM, Reid Thompson reid.thomp...@ateb.com wrote: Does this max_fsm_pages value seem OK for a 46GB database? I've clustered all the tables that seemed to be exhibiting large amounts of bloat. My

Re: [GENERAL] vacuum issues under load?

2010-01-18 Thread Scott Marlowe
On Mon, Jan 18, 2010 at 12:28 AM, Martijn van Oosterhout klep...@svana.org wrote: On Fri, Jan 15, 2010 at 08:41:38AM -0700, Scott Marlowe wrote: With slony 2.0.3 or so, I had occasional complete lockups of my database that I didn't have time to troubleshoot as it was a live cluster and I had

Re: [GENERAL] vacuum issues under load?

2010-01-18 Thread Scott Marlowe
On Mon, Jan 18, 2010 at 6:35 PM, Scott Marlowe scott.marl...@gmail.com wrote: You could have used create index interactively. s/interactively/concurrently/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] vacuum issues under load?

2010-01-18 Thread Scott Marlowe
On Mon, Jan 18, 2010 at 6:35 PM, Scott Marlowe scott.marl...@gmail.com wrote: On Mon, Jan 18, 2010 at 12:28 AM, Martijn van Oosterhout klep...@svana.org wrote: On Fri, Jan 15, 2010 at 08:41:38AM -0700, Scott Marlowe wrote: With slony 2.0.3 or so, I had occasional complete lockups of my

Re: [GENERAL] postgres external table

2010-01-18 Thread Craig Ringer
On 19/01/2010 1:13 AM, Vincenzo Romano wrote: Another case, Tom, could be when the file is updated from a non-DB application and you need to synchronize the data with other DB applications ... How can that work without a transactional file system, though? If the external process writes to

Re: [GENERAL] data dump help

2010-01-18 Thread Bret S. Lambert
On Mon, Jan 18, 2010 at 05:49:32PM -0600, Terry wrote: On Mon, Jan 18, 2010 at 5:07 PM, Terry td3...@gmail.com wrote: On Mon, Jan 18, 2010 at 4:48 PM, Andy Colson a...@squeakycode.net wrote: On 1/18/2010 4:08 PM, Terry wrote: Hello, Sorry for the poor subject. ?Not sure how to

Re: [GENERAL] data dump help

2010-01-18 Thread Andrej
2010/1/19 Bret S. Lambert bret.lamb...@gmail.com: Isn't this just over-engineering? Why not let the database do the work, and add the column with a default value of 0, so that you don't have to modify whatever 3rd-party app dumps the data: But what if his third-party software does something

Re: [GENERAL] data dump help

2010-01-18 Thread Bret S. Lambert
On Tue, Jan 19, 2010 at 06:35:10PM +1300, Andrej wrote: 2010/1/19 Bret S. Lambert bret.lamb...@gmail.com: Isn't this just over-engineering? Why not let the database do the work, and add the column with a default value of 0, so that you don't have to modify whatever 3rd-party app dumps the

Re: [GENERAL] data dump help

2010-01-18 Thread Johan Nel
Terry wrote: Hello, Sorry for the poor subject. Not sure how to describe what I need here. I have an application that logs to a single table in pgsql. In order for me to get into our log management, I need to dump it out to a file on a periodic basis to get new logs. I am not sure how to

Re: [GENERAL] postgres external table

2010-01-18 Thread Jayadevan M
Having 'external tables' lets us avoid the step of loading data from a file into the table. We do not have to check whether a load job has run successfully, whether the data in the table really corresponds to the data in the file etc. It also lets us decide how many rejects can be allowed and

[GENERAL] SETOF Record Problem

2010-01-18 Thread Yan Cheng Cheok
By referring to http://www.postgresql.org/docs/current/static/xfunc-sql.html#XFUNC-SQL-TABLE-FUNCTIONS, section 34.4.8. SQL Functions Returning TABLE I create the following stored procedures. -- Function: get_measurements(bigint) -- DROP FUNCTION get_measurements(bigint); CREATE OR REPLACE

[GENERAL] Index on immutable function call

2010-01-18 Thread Philippe Lang
Hi, I'm trying to figure out how to use an index on an immutable function call in order to speed up queries. I came up with this small test: --create database foo; --drop table indexed_table; create table indexed_table ( id serial primary key,

[GENERAL] C: extending text search: from where to start

2010-01-18 Thread Ivan Sergio Borgonovo
I'd like to extend full text search so that I can transform tvectors in tquery and have direct access to a tvector as a record/array. I'm on Debian. This is my first experience with pg source code. I'd appreciate any pointer that will quickly put me on the right track. thanks -- Ivan Sergio

Re: [GENERAL] SETOF Record Problem

2010-01-18 Thread A. Kretschmer
In response to Yan Cheng Cheok : By referring to http://www.postgresql.org/docs/current/static/xfunc-sql.html#XFUNC-SQL-TABLE-FUNCTIONS, section 34.4.8. SQL Functions Returning TABLE That's for language SQL, you are using: CREATE OR REPLACE FUNCTION get_measurements(IN bigint) LANGUAGE

Re: [GENERAL] Index on immutable function call

2010-01-18 Thread A. Kretschmer
In response to Philippe Lang : Hi, I'm trying to figure out how to use an index on an immutable function call in order to speed up queries. My goal is to make query... select * from indexed_table WHERE data1 this_is_a_long_transformation(data2); ... as fast as select * from