Re: [GENERAL] MySQL to Postgres question

2008-03-22 Thread Alvaro Herrera
Adam Rich wrote: > > The short answer is that Adam's statement is wrong, or at least > > misleading. > > Sorry Tom, I wasn't trying to do either. Joshua Drake (who I understand > to be a reliable source of postgresql information) said that applying > a sequence to a column after creation created

Re: [GENERAL] MySQL to Postgres question

2008-03-22 Thread Joshua D. Drake
On Sat, 22 Mar 2008 21:17:10 -0500 "Adam Rich" <[EMAIL PROTECTED]> wrote: > > The short answer is that Adam's statement is wrong, or at least > > misleading. > > Sorry Tom, I wasn't trying to do either. Joshua Drake (who I > understand to be a reliable source of postgresql information) said > th

Re: [GENERAL] MySQL to Postgres question

2008-03-22 Thread Adam Rich
> The short answer is that Adam's statement is wrong, or at least > misleading. Sorry Tom, I wasn't trying to do either. Joshua Drake (who I understand to be a reliable source of postgresql information) said that applying a sequence to a column after creation created issues, versus using the seri

Re: [GENERAL] MySQL to Postgres question

2008-03-22 Thread Tom Lane
"James B. Byrne" <[EMAIL PROTECTED]> writes: > On: Fri, 21 Mar 2008 13:53:36 -0500, "Adam Rich" <[EMAIL PROTECTED]> > wrote: >> I'd like to point out that using pg_dump does in fact apply sequences >> to columns after the fact. (at least in 8.3) Columns lose their >> "serial" designation after eac

Re: [GENERAL] --enable-thread-safety bug

2008-03-22 Thread Craig Ringer
Steve Clark wrote: I guess the real question is why we are running out of memory when this option is enabled. Since my app doesn't use threads that points to a memory leak in the ecpg library when enable thread safety is turned on. It might be worth building ecpg with debug symbols then runni

Re: [GENERAL] MySQL to Postgres question

2008-03-22 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sat, 22 Mar 2008 21:01:19 -0400 (EDT) "James B. Byrne" <[EMAIL PROTECTED]> wrote: > Message-ID: <[EMAIL PROTECTED]@sbcglobal.net> > > I am not at all > clear as to the implications of this statement but it caused me to > wonder if the primary ke

Re: [GENERAL] MySQL to Postgres question

2008-03-22 Thread James B. Byrne
Message-ID: <[EMAIL PROTECTED]@sbcglobal.net> On: Fri, 21 Mar 2008 13:53:36 -0500, "Adam Rich" <[EMAIL PROTECTED]> wrote: > > I am not sure about 8.3 but certainly earlier releases of PostgreSQL > > would have specific dependency issues when a sequence was applied to > > a column after the fact,

Re: [GENERAL] ALTER TABLE with USING clause for timestamp

2008-03-22 Thread Tom Lane
Josh Trutwin <[EMAIL PROTECTED]> writes: > I have a column in a table defined as type TEXT and I'd like to > convert to a TIME type - I tried this: > ALTER TABLE t1 ALTER COLUMN tcol TYPE TIME WITHOUT TIME ZONE; > which throws: > ERROR: column "tcol" cannot be cast to type "pg_catalog.time" You j

Re: [GENERAL] Postgres development

2008-03-22 Thread Robert Treat
On Wednesday 19 March 2008 23:51, Brent Wood wrote: > Hi all, > > I'm interested in finding what would be involved on enhancing Postgres to > allow queries run in one database in a cluster to access & join with tables > in other databases in the cluster, ie: cross database join support. > > This wo

Re: [GENERAL] Postgresql partitioning

2008-03-22 Thread Robert Treat
On Saturday 22 March 2008 09:39, Reece Hart wrote: > On Fri, 2008-03-21 at 23:00 -0400, Ram Ravichandran wrote: > > I assume that primary key > > uniqueness is not tested across tables. Right? > > That's correct. It's on the TODOs: > Inheritance > * Allow inherited tables to inherit indexes,

Re: [GENERAL] partitioning using dblink

2008-03-22 Thread Bruce Momjian
Added to TODO: o Add checks to prevent a CREATE RULE views on inherited tables http://archives.postgresql.org/pgsql-general/2008-02/msg01420.php --- Tom Lane wrote: > Scara Maccai <[EMAIL PROTECTED]> wri

Re: [GENERAL] Postgres connection error

2008-03-22 Thread Douglas McNaught
On 3/18/08, Vernon Van Zandt <[EMAIL PROTECTED]> wrote: > Greetings, > > I keep getting the following error when attempting to establish a > connection (from Perl): > > install_driver(Pg) failed: DBD::Pg object version undef does not match > bootstrap parameter 2.2.2 at /usr/lib/perl/5.8/DynaLo

[GENERAL] Postgres connection error

2008-03-22 Thread Vernon Van Zandt
Greetings, I keep getting the following error when attempting to establish a connection (from Perl): install_driver(Pg) failed: DBD::Pg object version undef does not match bootstrap parameter 2.2.2 at /usr/lib/perl/5.8/DynaLoader.pm line 245. Here's the body of code used to connect: sub db_

[GENERAL] help optimizing query

2008-03-22 Thread George Nychis
Hi all, I'm looking for helping optimizing a query. It currently requires two passes on the data per query, when I'd like to try and write it to only require a single pass. Here's the high level, it's parsing flow level network traffic and it's interested in 4 fields: src_ip, dst_ip, src_p

[GENERAL] ALTER TABLE with USING clause for timestamp

2008-03-22 Thread Josh Trutwin
Hi, I have a column in a table defined as type TEXT and I'd like to convert to a TIME type - I tried this: ALTER TABLE t1 ALTER COLUMN tcol TYPE TIME WITHOUT TIME ZONE; which throws: ERROR: column "tcol" cannot be cast to type "pg_catalog.time" From reading the ALTER TABLE documents there app

Re: [GENERAL] --enable-thread-safety bug

2008-03-22 Thread Steve Clark
Steve Clark wrote: Michael Meskes wrote: On Sat, Mar 22, 2008 at 12:51:30PM -0400, Steve Clark wrote: My program had no threads - as I pointed out if I change the default Makefile in the FreeBSD ports system to not enable thread safety my programs runs just fine for days on end. It appear

Re: [GENERAL] --enable-thread-safety bug

2008-03-22 Thread Steve Clark
Michael Meskes wrote: On Sat, Mar 22, 2008 at 12:51:30PM -0400, Steve Clark wrote: My program had no threads - as I pointed out if I change the default Makefile in the FreeBSD ports system to not enable thread safety my programs runs just fine for days on end. It appears to me without any ki

Re: [GENERAL] dynamically generated SQL and planner/performance

2008-03-22 Thread Alvaro Herrera
Ivan Sergio Borgonovo wrote: > But does this cascade to all the nested functions? > > functionA { > execute functionB { > sql statement > } > } > > As my previous example I've a functionA that build up a statement that > call another functionB that just contain static sql statements. Ea

Re: [GENERAL] --enable-thread-safety bug

2008-03-22 Thread Michael Meskes
On Sat, Mar 22, 2008 at 12:51:30PM -0400, Steve Clark wrote: > My program had no threads - as I pointed out if I change the default > Makefile in the FreeBSD ports > system to not enable thread safety my programs runs just fine for days > on end. It appears to me > without any kind of close exa

Re: [GENERAL] dynamically generated SQL and planner/performance

2008-03-22 Thread Ivan Sergio Borgonovo
On Sat, 22 Mar 2008 14:56:28 -0300 Alvaro Herrera <[EMAIL PROTECTED]> wrote: > PL/pgSQL can present a query to the planner, and get a plan. This > plan can be cached by PL/pgSQL. So if you execute a function > twice, the first time PL/pgSQL caches the plan and passes it to the > executor; the s

Re: [GENERAL] dynamically generated SQL and planner/performance

2008-03-22 Thread Alvaro Herrera
Ivan Sergio Borgonovo wrote: > On Fri, 21 Mar 2008 12:15:19 +0100 > "Albe Laurenz" <[EMAIL PROTECTED]> wrote: > > > The execution plan of dynamic queries from PL/pgSQL will not be > > cached; the query will be prepared at execution time every time you > > execute it. > > Pardon my ignorance but I

Re: [GENERAL] --enable-thread-safety bug

2008-03-22 Thread Martijn van Oosterhout
On Sat, Mar 22, 2008 at 12:42:51PM -0400, Tom Lane wrote: > > Do you create and destroy a lot of threads since it seems this memory > > won't be freed? > > The OP's program isn't threaded at all, since he was apparently running > with a non-threaded ecpg/libpq before. This means that the proposal

Re: [GENERAL] --enable-thread-safety bug

2008-03-22 Thread Steve Clark
Martijn van Oosterhout wrote: On Sat, Mar 22, 2008 at 11:28:24AM -0400, Steve Clark wrote: Retry - the malloc - maybe there is a memory leak when --enable-thread-saftey is enabled, send an out of memory message to the postgres log, abort the transaction - I don't know I am not a postgres devel

Re: [GENERAL] --enable-thread-safety bug

2008-03-22 Thread Steve Clark
Tom Lane wrote: Martijn van Oosterhout <[EMAIL PROTECTED]> writes: Note this is your in application, not the server. Only your program died. Ofcourse the transaction got aborted, since the client (you) disconnected. There is no way for this to write to the server log, since it may be one anothe

Re: [GENERAL] --enable-thread-safety bug

2008-03-22 Thread Tom Lane
Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > Note this is your in application, not the server. Only your program > died. Ofcourse the transaction got aborted, since the client (you) > disconnected. There is no way for this to write to the server log, > since it may be one another machine...

Re: [GENERAL] --enable-thread-safety bug

2008-03-22 Thread Martijn van Oosterhout
On Sat, Mar 22, 2008 at 11:28:24AM -0400, Steve Clark wrote: > Retry - the malloc - maybe there is a memory leak when > --enable-thread-saftey is enabled, > send an out of memory message to the postgres log, abort the > transaction - I don't know I am > not a postgres developer so I don't know al

Re: [GENERAL] --enable-thread-safety bug

2008-03-22 Thread Steve Clark
Tom Lane wrote: Steve Clark <[EMAIL PROTECTED]> writes: The return from malloc should be checked to make sure it succeeds - right??? Probably, but what do you expect the code to do if it doesn't succeed? This function seems not to have any defined error-return convention.

Re: [GENERAL] Postgresql partitioning

2008-03-22 Thread Reece Hart
On Fri, 2008-03-21 at 23:00 -0400, Ram Ravichandran wrote: > I assume that primary key > uniqueness is not tested across tables. Right? That's correct. It's on the TODOs: Inheritance * Allow inherited tables to inherit indexes, UNIQUE constraints, and primary/foreign keys (at http

Re: [GENERAL] Installing on Windows without using msi Installer

2008-03-22 Thread Julio Cesar Sánchez González
Jeff Williams wrote: I would like to install PostgreSQL manually as part of my applications install using InnoSetup. Is there anywhere the steps required to do this and if so where would I find them? Many thanks Jeff Try with the next URL: http://pginstaller.projects.postgresql.org/sile

Re: [GENERAL] Installing on Windows without using msi Installer

2008-03-22 Thread Thomas Kellerer
Jeff Williams wrote on 22.03.2008 05:20: I would like to install PostgreSQL manually as part of my applications install using InnoSetup. Is there anywhere the steps required to do this and if so where would I find them? Many thanks Jeff I think you should be able to use the -no-binaries ZIP