[GENERAL] Need Tool to sync databases with 8.3.1

2008-06-14 Thread D. Dante Lorenso
All, I used to rave about how great the EMS PostgreSQL tools were, but lately I've been disappointed by the lack of support for their Database Comparer 2007 for PostgreSQL. I need a tool that will compare 2 database schemas and allow me to migrate changes from one database to another. What

Re: [GENERAL] functions, selects and the planner

2008-06-14 Thread Tom Lane
"Matthew Dennis" <[EMAIL PROTECTED]> writes: > My question is when is the "select into _data" query planned/replanned? I'm > concerned that the query might only be planned once (e.g. the first time > it's executed or when the function is first defined) and cached > indefinitely. The table t is in

[GENERAL] functions, selects and the planner

2008-06-14 Thread Matthew Dennis
In PostgreSQL 8.3 lets say I have a table: create table t(c1 int, c2 int, ts0 timestamp with time zone, ts1 timestamp with time zone, data varchar); an index: create index t_c1_c2_ts0_idx on t using btree(c1, c2, ts0 desc); and a function: create function f(_ts timestamp(0) with time zone, _c1

Re: [GENERAL] dblink() cursor error/issue (TopMemoryContext)

2008-06-14 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> (I wonder whether we can't improve on that, at least for the case of a >> non-deferred after trigger, which'd have already been fired before we >> exit the subtransaction. The trick is how to know that there's nothing >> useful left i

Re: [GENERAL] dblink() cursor error/issue (TopMemoryContext)

2008-06-14 Thread Alvaro Herrera
Tom Lane wrote: > (I wonder whether we can't improve on that, at least for the case of a > non-deferred after trigger, which'd have already been fired before we > exit the subtransaction. The trick is how to know that there's nothing > useful left in the subtransaction's per-transaction memory co

Re: [GENERAL] why sequential scan is used on indexed column ???

2008-06-14 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > I created a test case that has close to the same estimated and > actual row counts and has the same plan if I disable enable_nestloop: There's something weird about this --- why does the second plan seqscan b_saskaita, instead of using the bitmap scan tha

Re: [GENERAL] why sequential scan is used on indexed column ???

2008-06-14 Thread Michael Fuhr
On Sat, Jun 14, 2008 at 04:59:44PM +0200, Andreas Kretschmer wrote: > Julius Tuskenis <[EMAIL PROTECTED]> schrieb: > > I have a question concerning performance. One of my queries take a long > > to execute. I tried to do "explain analyse" and I see that the > > sequential scan is being used, al

Re: [GENERAL] Stored procs / functions - execution failure

2008-06-14 Thread Craig Ringer
Damian Georgiou wrote: I am having an issue with a function where it used to run in a previous installation of postgres under windows. The box has since been decommissioned so I am unable to check exactly what version it was though it was version 8 under winxp. I am now running postgres 8.2.5 U

Re: [GENERAL] Stored procs / functions - execution failure

2008-06-14 Thread Tommy Gildseth
Damian Georgiou wrote: Hi All, I am having an issue with a function where it used to run in a previous installation of postgres under windows. The box has since been ERROR: function sp_schedulefromdate("unknown") does not exist LINE 1: select sp_scheduleFromDate('2008-01-01');

[GENERAL] Stored procs / functions - execution failure

2008-06-14 Thread Damian Georgiou
Hi All, I am having an issue with a function where it used to run in a previous installation of postgres under windows. The box has since been decommissioned so I am unable to check exactly what version it was though it was version 8 under winxp. I am now running postgres 8.2.5 Under OSX 10.5.3

Re: [GENERAL] Source RPM for 8.3.3?

2008-06-14 Thread Devrim GÜNDÜZ
Hi, On Sat, 2008-06-14 at 12:15 -0300, Jorge Godoy wrote: > > have you ever thought about using OpenSuSE's build service? Actually no. Peter, Reinhard and other folks are already working on improving OpenSuSE packages: http://people.planetpostgresql.org/peter/index.php?/archives/20-News-on-the

Re: [GENERAL] Source RPM for 8.3.3?

2008-06-14 Thread Jorge Godoy
On Saturday 14 June 2008 10:33:15 Devrim GÜNDÜZ wrote: > Hi, > > On Fri, 2008-06-13 at 10:24 -0700, Kevin Regan wrote: > > I was browsing the postgresql download site, but I wasn't able to find > > the source RPM for 8.3.3. Is it available on the site? > > I just finished uploading 8.3.3 SRPMs. Th

Re: [GENERAL] why sequential scan is used on indexed column ???

2008-06-14 Thread Andreas Kretschmer
Julius Tuskenis <[EMAIL PROTECTED]> schrieb: > Hello. > > I have a question concerning performance. One of my queries take a long > to execute. I tried to do "explain analyse" and I see that the > sequential scan is being used, although I have indexes set on columns > that are used in joins.

[GENERAL] why sequential scan is used on indexed column ???

2008-06-14 Thread Julius Tuskenis
Hello. I have a question concerning performance. One of my queries take a long to execute. I tried to do "explain analyse" and I see that the sequential scan is being used, although I have indexes set on columns that are used in joins. The question is - WHY, and how to change that behavior???

Re: [GENERAL] Source RPM for 8.3.3?

2008-06-14 Thread Devrim GÜNDÜZ
Hi, On Fri, 2008-06-13 at 10:24 -0700, Kevin Regan wrote: > I was browsing the postgresql download site, but I wasn't able to find > the source RPM for 8.3.3. Is it available on the site? I just finished uploading 8.3.3 SRPMs. They will be on ftp.postgresql.org in a few hours, after sync. Also

Re: [GENERAL] Nested IMMUTABLE functions

2008-06-14 Thread Joris Dobbelsteen
Peter wrote: I have two immutable Pl/PG funcs - func A takes a parameter X, looks up related value Y from a table and passes Y to func B. Now, if I do something like select A(field_x) from bigtable it will, of course call A for every single row since paramater is changing. However, it also call

Re: [GENERAL] Backup using GiT?

2008-06-14 Thread Ciprian Dorin Craciun
On Fri, Jun 13, 2008 at 11:11 PM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Tom Lane wrote: >> "James B. Byrne" <[EMAIL PROTECTED]> writes: > >> > GiT works by compressing deltas of the contents of successive versions of >> > file >> > systems under repository control. It treats binary objects

[GENERAL] XML output & multiple SELECT queries

2008-06-14 Thread Peter Billen
Dear PostgreSQL users, I would like to ask a question about outputting data as XML. Say I have two tables: team(integer id, text name); player_of_team(integer id, integer team_id, text name); (team_id is FK to team.id) I would like to query both tables to get following example XML output:

Re: [GENERAL] Overloading

2008-06-14 Thread D Galen
Ralph Smith wrote: I never did get an answer to this. I get: ERROR: cannot change return type of existing function HINT: Use DROP FUNCTION first. ** Error ** ERROR: cannot change return type of existing function SQL state: 42P13 Hint: Use DROP FUNCTION first. When I try t