Re: [GENERAL] MySQL -> Postgres migration tools?

2010-01-22 Thread Grzegorz Jaśkiewicz
On Fri, Jan 22, 2010 at 7:15 PM, Erik Jones wrote: > Hello, > > Given that the EU has approved Oracle's acquisition of Sun w/ MySQL it's > fairly likely that there may be a number of people and companies looking to > move from MySQL to Postgres in the coming months.  Does anyone know of any > g

Re: [GENERAL] What locking mechanism is used for database backup and restore and Master-Slave Replication?

2010-01-22 Thread Grzegorz Jaśkiewicz
and to answer the question of the release date, I believe sometime around summer holiday. There is a schedule, but in reality things usually slip by couple weeks, especially when you add quite few not so trivial patches like replication. -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] What locking mechanism is used for database backup and restore and Master-Slave Replication?

2010-01-22 Thread Grzegorz Jaśkiewicz
2010/1/22 John Mitchell : > When is the new version of postgres (8.5) scheduled to be released as the > latest stable version? there will be no 8.5. It was decided to name it 9.0. -- GJ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Pavel Stehule
2010/1/22 Vincenzo Romano : > 2010/1/22 Tom Lane : >> Vincenzo Romano writes: >>> 2010/1/22 Tom Lane : regression=# CREATE FUNCTION q( fmt text, variadic args "any" ) >> >>> And this would allow for a stdarg-like argument list? >> >> Yeah, it should work, given suitable C code. > > Great! >

Re: [GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread Scott Marlowe
And note that by taking place in the alpha testing, one can help get pgsql out the door that much faster. Use it in a staging / QA / testing environment that you can use to punish it to see if it breaks and report in the bugs. On Fri, Jan 22, 2010 at 4:35 PM, DM wrote: > It looks like alpha vers

Re: [GENERAL] Shall I convert all my stored procedure to use "EXECUTE", to ensure I get index-scan

2010-01-22 Thread Craig Ringer
On 22/01/2010 10:54 PM, Sam Mason wrote: On Fri, Jan 22, 2010 at 01:49:50AM -0800, Yan Cheng Cheok wrote: By refering to http://archives.postgresql.org/pgsql-general/2010-01/msg00846.php Does this means, I shall convert *ALL* my stored procedure, which use function parameter during its SQL quer

Re: [GENERAL] Slow Query / Check Point Segments

2010-01-22 Thread Greg Smith
John R Pierce wrote: we're having a similar problem with a very update intensive database that is part of a 24/7 manufacturing operation (no breathing time unless there's an unusual line down situtation) Your problem is actually a bit different. 2010-01-23 01:08:13 MYTLOG: checkpoint complet

Re: [GENERAL] VACUUM FULL performance issues with pg_largeobject table

2010-01-22 Thread PG User 2010
Hi Tom, As always, your insight is VERY helpful. We'll try your suggestions and see if that helps things out... Thanks! Sam On Fri, Jan 22, 2010 at 4:01 PM, Tom Lane wrote: > PG User 2010 writes: > > 1) is there any easy way to fiddle with the vacuum process so that it is > not > > CPU boun

Re: [GENERAL] VACUUM FULL performance issues with pg_largeobject table

2010-01-22 Thread Tom Lane
PG User 2010 writes: > 1) is there any easy way to fiddle with the vacuum process so that it is not > CPU bound and doing very little I/O? Why would vacuum full be CPU bound > anyway??? The only part of VAC FULL that seems like it could be CPU-bound is index cleanup. If the table is sufficientl

[GENERAL] Problem with execution of an update rule

2010-01-22 Thread Ken Winter
I'm trying to implement a history-keeping scheme using PostgreSQL views and update rules. My problem is that one of the commands in one of my crucial update rules apparently never executes. Briefly, the history-keeping scheme involves: * Two tables: an "h table" that contains the columns for wh

Re: [GENERAL] Old/New

2010-01-22 Thread Adrian Klaver
On Friday 22 January 2010 3:25:34 pm Bob Pawley wrote: > No > > The table p_id.processes is the start of the fluid_id ident and that column > is serial. > > Bob > Per Tom's suggestion can we see \d for p_id.processes and for good measure p_id.devices ? -- Adrian Klaver adrian.kla...@gmail.com

Re: [GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread DM
It looks like alpha version of 8.5 is already out here is the link http://www.postgresql.org/about/news.1172 Thanks Deepak On Fri, Jan 22, 2010 at 12:05 PM, Larry Rosenman wrote: > On Fri, 22 Jan 2010, John R Pierce wrote: > > Larry Rosenman wrote: >>

Re: [GENERAL] Ensuring same collation on OSX and Linux?

2010-01-22 Thread Tom Lane
John Norman writes: > I observe that with the apparently same locale settings on OSX and > Linux (stock Ubuntu 9.10), that the collations are different. > ... > Maybe the UTF8 collations on OSX (or Linux) are broken? Yeah, OS X's support for UTF8 locales is pretty broken :-(. You can find previo

[GENERAL] VACUUM FULL performance issues with pg_largeobject table

2010-01-22 Thread PG User 2010
Hi there, I originally posted these questions to the pgsql-performance mailing list, but due to lack of response, I think that these may be more general in nature--so I'm re-posting them here. Apologies for the cross-posting ahead of time. We are having real issues trying to reclaim dead blob sp

Re: [GENERAL] Old/New

2010-01-22 Thread Bob Pawley
No The table p_id.processes is the start of the fluid_id ident and that column is serial. Bob - Original Message - From: "Adrian Klaver" To: "Bob Pawley" Cc: "Tom Lane" ; "Postgresql" Sent: Friday, January 22, 2010 3:19 PM Subject: Re: [GENERAL] Old/New On Friday 22 January

Re: [GENERAL] Old/New

2010-01-22 Thread Adrian Klaver
On Friday 22 January 2010 3:05:54 pm Bob Pawley wrote: > This is the whole trigger > > > > Begin > > If new.pump1 = 'True' > > then > > Insert into p_id.devices (p_id_id, process_id, fluid_id, status, > process_graphics_id, device_description) > values (new.p_id_id, new.process_id, new.fluid_i

Re: [GENERAL] Old/New

2010-01-22 Thread Bob Pawley
This is the whole trigger Begin If new.pump1 = 'True' then Insert into p_id.devices (p_id_id, process_id, fluid_id, status, process_graphics_id, device_description) values (new.p_id_id, new.process_id, new.fluid_id, 'Pump #1', '11', 'Pump'); End if; If new.pump2 = 'True' then Insert i

Re: [GENERAL] Old/New

2010-01-22 Thread Adrian Klaver
On Friday 22 January 2010 2:05:02 pm Tom Lane wrote: > "Bob Pawley" writes: > > Instead I get two identical rows inserted containing the fluid_id = > > '3501' and 'Pump #1'. > > Seems like the only way that's possible with the INSERT .. VALUES > formulation is if the trigger function gets execute

Re: [GENERAL] Old/New

2010-01-22 Thread Tom Lane
"Bob Pawley" writes: > Instead I get two identical rows inserted containing the fluid_id = '3501' > and 'Pump #1'. Seems like the only way that's possible with the INSERT .. VALUES formulation is if the trigger function gets executed twice. Maybe you accidentally created two instances of the t

[GENERAL] Sugerencia de opcion

2010-01-22 Thread Informatica-Cooperativa Cnel. Oviedo
Buenos Dias todos,                             Soy un usuario de postgres de Paraguay, consulto sobre la posibilidad de inclucion en la futura version la siguiente sentencia(Uso de alias en la condicion HAVING ):     SELECT id, sum(salario) as SumaSalario     FROM salarios     GROUP BY id  

[GENERAL] Ensuring same collation on OSX and Linux?

2010-01-22 Thread John Norman
I observe that with the apparently same locale settings on OSX and Linux (stock Ubuntu 9.10), that the collations are different. Here's my sample query: select name from ( select 'A' as name union select 'a' as name ) tab order by name asc OSX: LC_COLLATE="en_US.UTF-8" Result: n

Re: [GENERAL] Old/New

2010-01-22 Thread Bob Pawley
I have a table labeled p_id.processes. One row is inserted into it by another source containing fluid_id 3501 and other fields. The update statement - update p_id.processes set pump1 = 'True' where p_id.processes.fluid_id = '3501' ; updates the field pump1 to 'True'. The After Update trigge

[GENERAL] initdb failes on Traditional chinese machine when postgres install directory contains chinese characters.

2010-01-22 Thread Sarkar, Sudipta
Hi, I downloaded postgres 8.4 in zip format and installed it under c:\postgres用�裘� on a traditional Chinese windows 2003 server. Note the Chinese characters in the folder name. Then I tried to create a database using initdb. I specified the following command: initdb.exe --encoding UTF-8 -D

Re: [GENERAL] MySQL -> Postgres migration tools?

2010-01-22 Thread Serge Fonville
Hi, I googled for 'migrate mysql to postgresql' the first 5 results seem very useful. The most useful link I found was http://www.raditha.com/mysql/mysql2pgsql.php HTH Regards, Serge Fonville On Fri, Jan 22, 2010 at 8:15 PM, Erik Jones wrote: > Hello, > > Given that the EU has approved Oracle

Re: [GENERAL] Old/New

2010-01-22 Thread Adrian Klaver
On 01/22/2010 01:16 PM, Bob Pawley wrote: I have a single row that is being duplicated on insert. Update statement - update p_id.processes set pump1 = 'True' where p_id.processes.fluid_id = '3501' ; The proper field is updated. Bob This is insufficient detail. What is the row? What are the

Re: [GENERAL] Old/New

2010-01-22 Thread Bob Pawley
I have a single row that is being duplicated on insert. Update statement - update p_id.processes set pump1 = 'True' where p_id.processes.fluid_id = '3501' ; The proper field is updated. Bob - Original Message - From: "Adrian Klaver" To: "Bob Pawley" Cc: "Tom Lane" ; "Postgresql

Re: [GENERAL] Old/New

2010-01-22 Thread Adrian Klaver
On 01/22/2010 01:05 PM, Bob Pawley wrote: Begin If new.pump1 = 'True' then Insert into p_id.devices (p_id_id, process_id, fluid_id, status, process_graphics_id, device_description) values (new.p_id_id, new.process_id, new.fluid_id, 'Pump #1', '11', 'Pump'); End if; If new.pump2 = 'True' the

Re: [GENERAL] Old/New

2010-01-22 Thread Bob Pawley
Begin If new.pump1 = 'True' then Insert into p_id.devices (p_id_id, process_id, fluid_id, status, process_graphics_id, device_description) values (new.p_id_id, new.process_id, new.fluid_id, 'Pump #1', '11', 'Pump'); End if; If new.pump2 = 'True' then Insert into p_id.devices (p_id_id, proce

Re: [GENERAL] Old/New

2010-01-22 Thread Adrian Klaver
On 01/22/2010 11:20 AM, Bob Pawley wrote: I haven't found any documentation on how the underlying structure of PostgreSQL actually operates. So I have had to extrapolate. I think what you are saying is that on an update of a field the whole row which includes that field is affected to the extent

Re: [GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread Larry Rosenman
On Fri, 22 Jan 2010, John R Pierce wrote: Larry Rosenman wrote: Yeah. The question of "when do we call it 9.0" has come up multiple times over the past few release cycles, and "when we get built-in replication" has always been one of the more popular answers. If HS+SR aren't enough to justify

[GENERAL] MySQL -> Postgres migration tools?

2010-01-22 Thread Erik Jones
Hello, Given that the EU has approved Oracle's acquisition of Sun w/ MySQL it's fairly likely that there may be a number of people and companies looking to move from MySQL to Postgres in the coming months. Does anyone know of any good, current migration tools out there? A search for mysql on

Re: [GENERAL] Slow Query / Check Point Segments

2010-01-22 Thread John R Pierce
Greg Smith wrote: 2010-01-22 12:21:48 JSTLOG: checkpoint complete: wrote 83874 buffers (16.0%); 0 transaction log file(s) added, 0 removed, 32 recycled; write=138.040 s, sync=0.000 s, total=138.063 s 2010-01-22 12:23:32 JSTLOG: checkpoint complete: wrote 82856 buffers (15.8%); 0 transaction l

Re: [GENERAL] Old/New

2010-01-22 Thread Tom Lane
"Bob Pawley" writes: > I haven't found any documentation on how the underlying structure of > PostgreSQL actually operates. So I have had to extrapolate. > I think what you are saying is that on an update of a field the whole row > which includes that field is affected to the extent that the w

Re: [GENERAL] Old/New

2010-01-22 Thread Bob Pawley
I haven't found any documentation on how the underlying structure of PostgreSQL actually operates. So I have had to extrapolate. I think what you are saying is that on an update of a field the whole row which includes that field is affected to the extent that the whole row falls under the rul

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Vincenzo Romano
2010/1/22 Tom Lane : > Vincenzo Romano writes: >> 2010/1/22 Tom Lane : >>> regression=# CREATE FUNCTION q( fmt text, variadic args "any" ) > >> And this would allow for a stdarg-like argument list? > > Yeah, it should work, given suitable C code. Great! -- Vincenzo Romano NotOrAnd Information T

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Tom Lane
Vincenzo Romano writes: > 2010/1/22 Tom Lane : >> regression=# CREATE FUNCTION q( fmt text, variadic args "any" ) > And this would allow for a stdarg-like argument list? Yeah, it should work, given suitable C code. regards, tom lane -- Sent via pgsql-general mailing li

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Vincenzo Romano
2010/1/22 Tom Lane : > Vincenzo Romano writes: >>> I think "variadic any" is exactly it, but too lazy to go look. > >> I fear there's no way! > >> tmp1=# CREATE FUNCTION q( fmt text, variadic args any ) > > More like this: > > regression=# CREATE FUNCTION q( fmt text, variadic args "any" ) > regre

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Tom Lane
Vincenzo Romano writes: >> I think "variadic any" is exactly it, but too lazy to go look. > I fear there's no way! > tmp1=# CREATE FUNCTION q( fmt text, variadic args any ) More like this: regression=# CREATE FUNCTION q( fmt text, variadic args "any" ) regression-# RETURNS void regression-# LA

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Vincenzo Romano
2010/1/22 Tom Lane : > Vincenzo Romano writes: >> 2010/1/22 Tom Lane : >>> Vincenzo Romano writes: So there's no way to have a function accepting a VARIADIC ANY. Right? >>> >>> Not in PL functions.  You can do it in C if you're desperate (but you >>> then have to deal with each argument indi

Re: [GENERAL] DDL question

2010-01-22 Thread Alban Hertroys
On 22 Jan 2010, at 16:31, Volkan Varol wrote: > Hello precious and brilliant minds, > > I would like to know if there's a better way (syntactical or logical) to > achieve a better performance for the scenario below: > > Let's say we have any kind of query with a LIMIT and an OFFSET (used to >

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Tom Lane
Vincenzo Romano writes: > 2010/1/22 Tom Lane : >> Vincenzo Romano writes: >>> So there's no way to have a function accepting a VARIADIC ANY. Right? >> >> Not in PL functions.  You can do it in C if you're desperate (but you >> then have to deal with each argument individually --- they're not for

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Vincenzo Romano
2010/1/22 Tom Lane : > Vincenzo Romano writes: >> So there's no way to have a function accepting a VARIADIC ANY. Right? > > Not in PL functions.  You can do it in C if you're desperate (but you > then have to deal with each argument individually --- they're not formed > into an array). How would

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Tom Lane
Vincenzo Romano writes: > So there's no way to have a function accepting a VARIADIC ANY. Right? Not in PL functions. You can do it in C if you're desperate (but you then have to deal with each argument individually --- they're not formed into an array). regards, tom lane

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Vincenzo Romano
2010/1/22 Tom Lane : > Vincenzo Romano writes: >> I'm using the printf() function as seen here: >> http://wiki.postgresql.org/wiki/Sprintf > > ... which is "variadic anyarray". > >> I was expecting that a "variadic polymorphic" function was able to >> accept a "variable number of arguments of diff

Re: [GENERAL] Variadic polymorpic functions

2010-01-22 Thread Tom Lane
Vincenzo Romano writes: > I'm using the printf() function as seen here: > http://wiki.postgresql.org/wiki/Sprintf ... which is "variadic anyarray". > I was expecting that a "variadic polymorphic" function was able to > accept a "variable number of arguments of different types" (a-la C), > while

Re: [GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread John R Pierce
Larry Rosenman wrote: Yeah. The question of "when do we call it 9.0" has come up multiple times over the past few release cycles, and "when we get built-in replication" has always been one of the more popular answers. If HS+SR aren't enough to justify a major version bump, I'm not sure what wou

Re: [GENERAL] Old/New

2010-01-22 Thread Tom Lane
"Bob Pawley" writes: > Following is the format with which I have had great success using "New" in > After Insert triggers. > Insert into p_id.devices (p_id_id, process_id, fluid_id, status, > process_graphics_id, device_description) > select (p_id.processes.p_id_id), (p_id.processes.process_i

Re: [GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread Vincenzo Romano
2010/1/22 John R Pierce : > A. Kretschmer wrote: >> >> The next version will be 9.0, released when it is ready for production. >> > > why the major jump ?   Is there a quantum leap in functionality, or > performance, or internal architecture ? It's just the next version number. -- Vincenzo Roman

Re: [GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread Larry Rosenman
On Fri, 22 Jan 2010, John R Pierce wrote: A. Kretschmer wrote: The next version will be 9.0, released when it is ready for production. why the major jump ? Is there a quantum leap in functionality, or performance, or internal architecture ? Copied from an identical thread on -hackers: --

Re: [GENERAL] ISO guidelines/strategies to guard injection attacks

2010-01-22 Thread Andy Colson
On 1/21/2010 3:53 PM, Kynn Jones wrote: On Tue, Jan 19, 2010 at 4:49 PM, Andy Colson mailto:a...@squeakycode.net>> wrote: On 1/19/2010 3:39 PM, Andy Colson wrote: On 1/19/2010 3:23 PM, Kynn Jones wrote: I have a Perl CGI script (using DBD::Pg) that interfaces with a

Re: [GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread John R Pierce
A. Kretschmer wrote: The next version will be 9.0, released when it is ready for production. why the major jump ? Is there a quantum leap in functionality, or performance, or internal architecture ? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change

[GENERAL] Variadic polymorpic functions

2010-01-22 Thread Vincenzo Romano
Hi all. I'm using the printf() function as seen here: http://wiki.postgresql.org/wiki/Sprintf What I see is that when I call that function with just 1 argument, it's always OK. As here: -- code mp1=# SELECT printf( '%',now() ); printf --- 2010-01-22 18:31:

Re: [GENERAL] Old/New

2010-01-22 Thread Bob Pawley
Following is the format with which I have had great success using "New" in After Insert triggers. Insert into p_id.devices (p_id_id, process_id, fluid_id, status, process_graphics_id, device_description) select (p_id.processes.p_id_id), (p_id.processes.process_id), (p_id.processes.fluid_id), (

Re: [GENERAL] more docs on extending postgres in C

2010-01-22 Thread Ivan Sergio Borgonovo
On Fri, 22 Jan 2010 11:02:46 -0500 Tom Lane wrote: > Ivan Sergio Borgonovo writes: > > If I had to build stuff in the pg source tree I'd just clone a > > contrib directory and change the makefile [1]. What am I > > supposed to do if I'd like to create a contrib elsewhere (eg. > > ~/Documents/nfs

Re: [GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread DM
Thank you for the update. Thanks Deepak On Fri, Jan 22, 2010 at 5:45 AM, Bruce Momjian wrote: > A. Kretschmer wrote: > > In response to DM : > > > Hello All, > > > > > > When is the release date for Postgres 8.5? > > > > Never. > > > > The next version will be 9.0, released when it is ready for

Re: [GENERAL] PostreSQL PostgreSQL 8.1.18 and Tsearch2 context error

2010-01-22 Thread Neoyagami Yasakani
http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/tsearch-V2-intro.html start snippet- Lets take a look at the function to_tsquery. It also has 3 signatures which follow the same rational as the to_tsvector function: to_tsquery(oid, text); to_tsquery

Re: [GENERAL] PostreSQL PostgreSQL 8.1.18 and Tsearch2 context error

2010-01-22 Thread Andrés
On 22 ene, 11:30, Neoyagami Yasakani wrote: > http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/tsearch-V... > > start snippet- > Lets take a look at the function to_tsquery. It also has 3 signatures > which follow the same rational as the to_tsvector function: > >  

Re: [GENERAL] PostreSQL PostgreSQL 8.1.18 and Tsearch2 context error

2010-01-22 Thread Neoyagami Yasakani
the config reference exist for "spanish" ? i bet the problem is there. On 18 ene, 16:00, rodrigo.valdene...@gmail.com (Rodrigo Valdenegro) wrote: > 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" mess

[GENERAL] Re: Shall I convert all my stored procedure to use "EXECUTE", to ensure I get index-scan

2010-01-22 Thread Vincenzo Romano
2010/1/22 Sam Mason : > On Fri, Jan 22, 2010 at 01:49:50AM -0800, Yan Cheng Cheok wrote: >> By refering to >> http://archives.postgresql.org/pgsql-general/2010-01/msg00846.php >> >> Does this means, I shall convert *ALL* my stored procedure, which use >> function parameter during its SQL query, to

Re: [GENERAL] more docs on extending postgres in C

2010-01-22 Thread Tom Lane
Ivan Sergio Borgonovo writes: > If I had to build stuff in the pg source tree I'd just clone a > contrib directory and change the makefile [1]. What am I supposed to > do if I'd like to create a contrib elsewhere (eg. > ~/Documents/nfs/projects/ts_extensions)? Use PGXS: http://www.postgresql.org/

Re: [GENERAL] Error "invalid byte sequence for encoding UTF8" on insert into BYTEA column

2010-01-22 Thread Tom Lane
Alan Millington writes: > What I send to mxODBC is the command as a string containing placeholders > (question marks), e.g. "insert into mytable (intcol, byteacol) values (?, > ?)", plus the actual values as separate arguments, e.g. 1, data (where 1 is a > literal and data is a Python variable

Re: [GENERAL] DDL question

2010-01-22 Thread Raymond O'Donnell
On 22/01/2010 15:31, Volkan Varol wrote: [snip] > my scenario this is unavoidable since I require it, but there may be a > trick to reduce its overall cost. > > The only alternative solution I've come up with so far is to save row > counts into the table itself using triggers. Is this reasonable o

[GENERAL] DDL question

2010-01-22 Thread Volkan Varol
Hello precious and brilliant minds, I would like to know if there's a better way (syntactical or logical) to achieve a better performance for the scenario below: Let's say we have any kind of query with a LIMIT and an OFFSET (used to limit/offset rows displayed on the web page). For example: QUE

Re: [GENERAL] Shall I convert all my stored procedure to use "EXECUTE", to ensure I get index-scan

2010-01-22 Thread Sam Mason
On Fri, Jan 22, 2010 at 01:49:50AM -0800, Yan Cheng Cheok wrote: > By refering to > http://archives.postgresql.org/pgsql-general/2010-01/msg00846.php > > Does this means, I shall convert *ALL* my stored procedure, which use > function parameter during its SQL query, to use EXECUTE, to ensure I > a

Re: [GENERAL] timestamps, epoch and time zones

2010-01-22 Thread Alberto Colombo
Thanks, I also think that the whole time/zone bit is a bit confusing. My major mistake, probably, was that I was interchanging timestamp and timestamptz (because I didn't know this latter form and timestamp with time zone is quite a mouthful!). I'll make more experiments and see if I can get it

Re: [GENERAL] What locking mechanism is used for database backup and restore and Master-Slave Replication?

2010-01-22 Thread John Mitchell
When is the new version of postgres (8.5) scheduled to be released as the latest stable version? Thanks, John 2010/1/21 Grzegorz Jaśkiewicz > depends on what sort of replication you are going to use really. > Most are based on triggers. So they have a bit more impact on > performance. As far a

Re: [GENERAL] Changing FS when full

2010-01-22 Thread Fernando Schapachnik
En un mensaje anterior, Greg Smith escribió: > >So, any way of instructing PG (8.1 if that matters) to place those > >files elsewhere without an initdb? > > > > You can create another table just like the original on a tablespace > using the new storage, drop the original, and then rename the n

Re: [GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread Bruce Momjian
A. Kretschmer wrote: > In response to DM : > > Hello All, > > > > When is the release date for Postgres 8.5? > > Never. > > The next version will be 9.0, released when it is ready for production. Yea, we are months away from a new major release. -- Bruce Momjian http://momjian.us

Re: [GENERAL] Error "invalid byte sequence for encoding UTF8" on insert into BYTEA column

2010-01-22 Thread Alan Millington
Having done some investigation, I can shed further light on the problem.   Within an interactive Python session I connected to the database using mxODBC: the variable csr is an mxODBC cursor object. I made the following assignments:   sql = 'insert into mytable (seq_num, data) values (?, ?)' data

Re: [GENERAL] more docs on extending postgres in C

2010-01-22 Thread Ivan Sergio Borgonovo
On Wed, 20 Jan 2010 17:43:27 +0100 Adrian von Bidder wrote: > On Wednesday 20 January 2010 15.42:14 Ivan Sergio Borgonovo wrote: > > I'd also appreciate some suggestion about dev environment and > > best practices on Debian, something that could help me to > > compile, install, test easily on Deb

Re: [GENERAL] timestamps, epoch and time zones

2010-01-22 Thread Sam Mason
On Fri, Jan 22, 2010 at 11:45:30AM -, Alberto Colombo wrote: > select extract(epoch from timestamp 'epoch'); > > date_part > --- > -3600 > > Shouldn't that be zero? My timezone is Europe/London (but does it > matter?). Writing "timestamp" like that says that you want the time

Re: [GENERAL] Optimization on JOIN

2010-01-22 Thread Sam Mason
On Thu, Jan 21, 2010 at 10:59:42PM -0800, Yan Cheng Cheok wrote: > Currently, I am having JOIN statement as follow (1st case) > > SELECT measurement_type.value, measurement.value, measurement_unit.value > FROM > measurement_type INNER JOIN > (measurement_unit INNER JOIN >

Re: [GENERAL] Optimization on JOIN

2010-01-22 Thread Alban Hertroys
On 22 Jan 2010, at 7:59, Yan Cheng Cheok wrote: > SELECT measurement_type.value, measurement.value, measurement_unit.value >FROM >measurement_type INNER JOIN >(measurement_unit INNER JOIN >(measurement INNER JOIN >(lot INNER JOIN unit ON (lot_id = fk_

[GENERAL] timestamps, epoch and time zones

2010-01-22 Thread Alberto Colombo
Hello, Maybe it's a question for pgsql-novice, but I have a problem converting to and from unix times. In particular, it seems that a round trip unix->PG->unix does not return the original timestamp: select extract(epoch from timestamp 'epoch'); date_part --- -3600 Sho

Re: [GENERAL] Error "invalid byte sequence for encoding UTF8" on insert into BYTEA column

2010-01-22 Thread Alan Millington
>> Today for the first time since upgrading to Postgres 8.4.1 I tried >> out part of the code which inserts some binary data into a table. The >> insert failed with the error "invalid byte sequence for encoding >> UTF8". That is odd, because the column into which the insert was made >> is of type b

[GENERAL] Shall I convert all my stored procedure to use "EXECUTE", to ensure I get index-scan

2010-01-22 Thread Yan Cheng Cheok
By refering to http://archives.postgresql.org/pgsql-general/2010-01/msg00846.php It solves speed problem in stored procedure, which use function parameter, during its SQL query. Does this means, I shall convert *ALL* my stored procedure, which use function parameter during its SQL query, to use

[GENERAL] Application compatibility with Windows7

2010-01-22 Thread Windows 7 Compatibility
Dear Support Team, Our firm is currently in the process of evaluating an upgrade to Windows 7. As a part of this process, we are conducting an audit of Windows 7 compatibility for various applications used by our employees. We were unable to find compatibility details for the following applicat

Re: [GENERAL] Slow Query / Check Point Segments

2010-01-22 Thread Alex -
Greg,thanks for the suggestions, will try an test. You wrote: That just suggests that the system was mostly idle during that period. Thats actually not the case, it was just the time the function finished. Alex Date: Fri, 22 Jan 2010 01:21:59 -0500 From: g...@2ndquadrant.com To: ainto...@hotma

Re: [GENERAL] Help me about postgreSql code

2010-01-22 Thread Mark Morgan Lloyd
John R Pierce wrote: Elian Laura wrote: i understand, but why my teacher wrote in his paper.."Probably the most obvious case is a database engine where the user defines, at run time, if a field is integer, char, float, etc. but, it is not necessary to compile the program again. All this felxib

Re: [GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread A. Kretschmer
In response to DM : > Hello All, > > When is the release date for Postgres 8.5? Never. The next version will be 9.0, released when it is ready for production. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG: 0x31720C99, 1006 CCB4 A326

[GENERAL] Fragmentation/Vacuum, Analyze, Re-Index

2010-01-22 Thread DM
Hello All, How to identify if a table requires full vacuum? How to identify when to do re-index on an existing index of a table? Is there any tool for the above? Thanks Deepak Murthy

[GENERAL] When is the release date for Postgres 8.5?

2010-01-22 Thread DM
Hello All, When is the release date for Postgres 8.5? Thanks Deepak