Re: [GENERAL] PG 8.2 instal on Win2k3 - unable to connect to test network socket

2009-08-26 Thread Craig Ringer
On Wed, 2009-08-26 at 18:43 -0300, geoff wrote: > > Sounds like you already have something listening on 5432. Perhaps > > another verison of PostgreSQL already installed? > > > Thats what I thought, but a port scan tells me that the port is closed. > Try using the `netstat' command (or one of t

Re: [GENERAL] It looks like transaction, but it isn't transaction

2009-08-26 Thread Tom Lane
Sergey Samokhin writes: > I should rejig my question: is this normal for a query made up from > several commands to be completely discarded if an error occurs? Yes, if it's submitted as a single Query message, that's what happens. Also, the implicit transaction is around the whole Query message n

Re: [GENERAL] It looks like transaction, but it isn't transaction

2009-08-26 Thread Sergey Samokhin
Hello, Sam. Thanks for the answer. > This behavior seems to be what libpq exposes by default: > >  http://www.postgresql.org/docs/current/static/libpq-exec.html The driver I was talking about isn't written in C and doesn't use libpq behind the scene like interfaces for Perl/Python/Tcl do, so wha

Re: [GENERAL] [Skytools-users] WAL Shipping + checkpoint

2009-08-26 Thread Mark Kirkwood
Sébastien Lardière wrote: On 26/08/2009 04:46, Mark Kirkwood wrote: Sébastien Lardière wrote: Hi All, I've a cluster ( Pg 8.3.7 ) with WAL Shipping, and a few hours ago, the master had to restart. I use walmgr from Skytools, which works very well. I have already restart the master without

Re: [GENERAL] PG 8.2 instal on Win2k3 - unable to connect to test network socket

2009-08-26 Thread geoff
> Sounds like you already have something listening on 5432. Perhaps > another verison of PostgreSQL already installed? > Thats what I thought, but a port scan tells me that the port is closed. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscripti

Re: [GENERAL] How to create a multi-column index with 2 dates using 'gist'?

2009-08-26 Thread Jeff Davis
On Wed, 2009-08-26 at 23:08 +0800, Fred Janon wrote: > Thanks Gerhard, interesting but I wonder if it is a maintained > project, the files date from May 2008 and there is not much forum > activity. I'll out it on my list of "To be investigated". Well, it's maintained in the sense of "I don't know

Re: [GENERAL] Import data from XML file

2009-08-26 Thread Bill Bartlett
We've used Pentaho Data Integration (aka Kettle) at http://kettle.pentaho.org to do this in the past. (Kettle is the free / open source version, although there is a bigger commercial version of PDI that does more.) It reads XML nicely and talks natively to PostgreSQL databases, so you can load dat

Re: [GENERAL] Aggregate function with Join stop working under certain condition

2009-08-26 Thread Naoko Reeves
The solution provide by Sam is unbelievably fast and works 100% accurately. Thank you very much. -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sam Mason Sent: Wednesday, August 26, 2009 10:40 AM To: pgsql-general@postgr

Re: [GENERAL] Import data from XML file

2009-08-26 Thread Martin Gainty
Erwin did you try ems-data? http://ems-data-import-2007-for-postgresql.software.informer.com/3.0/ Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorge

Re: [GENERAL] No download of Windows binaries without registering?

2009-08-26 Thread Magnus Hagander
On Wed, Aug 26, 2009 at 21:15, Sam Mason wrote: > On Wed, Aug 26, 2009 at 08:58:17PM +0200, Magnus Hagander wrote: >> On Wed, Aug 26, 2009 at 20:45, Sam Mason wrote: >> > On Wed, Aug 26, 2009 at 08:11:58PM +0200, Thomas Kellerer wrote: >> >> If one goes directly http://www.enterprisedb.com/products

Re: [GENERAL] No download of Windows binaries without registering?

2009-08-26 Thread Thomas Kellerer
Magnus Hagander wrote on 26.08.2009 20:37: You can certainly get it without registering. The link from the PostgreSQL download page points to http://www.enterprisedb.com/products/pgdownload.do, where no registration is required. How did you end up at the page above? Perhaps we have a link that

Re: [GENERAL] Creating index for convert text to integer

2009-08-26 Thread Sam Mason
On Wed, Aug 26, 2009 at 07:13:41AM -0700, xaviergxf wrote: > How can i create a index to index all the fields that has the type > INTEGER, in the following table: > > create type properties_types as enum('INTEGER', 'STRING', 'FLOAT'); > > create table properties_types( >value text NOT NULL,

Re: [GENERAL] Import data from XML file

2009-08-26 Thread Will Rutherdale (rutherw)
One solution is to use Perl DBI. DBD::AnyData will read xml. DBD::Pg will write to Postgres. -Will > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of > Erwin Brandstetter > Sent: 26 August 2009 12:10 > To: pgsql

Re: [GENERAL] No download of Windows binaries without registering?

2009-08-26 Thread Sam Mason
On Wed, Aug 26, 2009 at 08:58:17PM +0200, Magnus Hagander wrote: > On Wed, Aug 26, 2009 at 20:45, Sam Mason wrote: > > On Wed, Aug 26, 2009 at 08:11:58PM +0200, Thomas Kellerer wrote: > >> If one goes directly http://www.enterprisedb.com/products/pgbindownload.do > >> this is not necessary (which i

[GENERAL] Creating index for convert text to integer

2009-08-26 Thread xaviergxf
Hi, How can i create a index to index all the fields that has the type INTEGER, in the following table: create type properties_types as enum('INTEGER', 'STRING', 'FLOAT'); create table properties_types( value text NOT NULL, value_type properties_types NOT NULL ); insert into properties_

Re: [GENERAL] PG 8.2 instal on Win2k3 - unable to connect to test network socket

2009-08-26 Thread Magnus Hagander
On Wed, Aug 26, 2009 at 19:12, imageguy wrote: > When I tried to install pg8.2 on Win2k3 service pack 2 using the > installer I received the error message window > > Unable to connect to the test network socket : 100013 > > If I changed the port from the default '5432' to 5433 works fine. Sounds l

Re: [GENERAL] No download of Windows binaries without registering?

2009-08-26 Thread Magnus Hagander
On Wed, Aug 26, 2009 at 20:45, Sam Mason wrote: > On Wed, Aug 26, 2009 at 08:11:58PM +0200, Thomas Kellerer wrote: >> If one goes directly http://www.enterprisedb.com/products/pgbindownload.do >> this is not necessary (which is what I expect), but as far as I can tell, >> there is no direct link to

Re: [GENERAL] No download of Windows binaries without registering?

2009-08-26 Thread Rainer Bauer
Thomas Kellerer schrieb: >If one goes directly http://www.enterprisedb.com/products/pgbindownload.do >this is not necessary (which is what I expect), but as far as I can tell, >there is no direct link to that page. You get there from the official PostgreSQL download page:

Re: [GENERAL] Import data from XML file

2009-08-26 Thread Scott Bailey
Hi! How do you import data from an xml-file? For instance, if I have a file like this: Sonstiges 5 Buehne 2 Konzerte 1 Reggae 1 45 sonstige 5 44 ... an

Re: [GENERAL] No download of Windows binaries without registering?

2009-08-26 Thread Sam Mason
On Wed, Aug 26, 2009 at 08:11:58PM +0200, Thomas Kellerer wrote: > If one goes directly http://www.enterprisedb.com/products/pgbindownload.do > this is not necessary (which is what I expect), but as far as I can tell, > there is no direct link to that page. hum, http://www.postgresql.org/dow

Re: [GENERAL] No download of Windows binaries without registering?

2009-08-26 Thread Magnus Hagander
On Wed, Aug 26, 2009 at 20:11, Thomas Kellerer wrote: > Hi, > > it seems that you cannot download PostgreSQL from the EnterpriseDB website > without first registering with EnterpriseDB. I can somhow understand this > cumbersome requirement for their own products, but I do not like the taste > of it

Re: [GENERAL] It looks like transaction, but it isn't transaction

2009-08-26 Thread Sam Mason
On Wed, Aug 26, 2009 at 05:06:27AM +0400, Sergey Samokhin wrote: > There is one thing I find especially interesting: queries I pass to > the pgsql:squery() are executed with some properties specific to > transactions! This behavior seems to be what libpq exposes by default: http://www.postgresq

[GENERAL] No download of Windows binaries without registering?

2009-08-26 Thread Thomas Kellerer
Hi, it seems that you cannot download PostgreSQL from the EnterpriseDB website without first registering with EnterpriseDB. I can somhow understand this cumbersome requirement for their own products, but I do not like the taste of it for the "plain" PostgreSQL builds. This doesn't sound right to

Re: [GENERAL] Aggregate function with Join stop working under certain condition

2009-08-26 Thread Sam Mason
On Wed, Aug 26, 2009 at 11:17:10AM -0400, Naoko Reeves wrote: > I am joining 4 tables (doc, bpt, con, emp) - emp and doc relationship is > one to many. I want to only one doc record per emp as condition shown > below: [...] > However, I wan to add one more doc column but as soon as I add one, it

[GENERAL] PG 8.2 instal on Win2k3 - unable to connect to test network socket

2009-08-26 Thread imageguy
When I tried to install pg8.2 on Win2k3 service pack 2 using the installer I received the error message window Unable to connect to the test network socket : 100013 If I changed the port from the default '5432' to 5433 works fine. - any suggestions ? Google showed me an email regarding this mess

Re: [GENERAL] Import data from XML file

2009-08-26 Thread Sam Mason
On Wed, Aug 26, 2009 at 09:10:25AM -0700, Erwin Brandstetter wrote: > How do you import data from an xml-file? If they're all that small, put the file into the database as is and then use xpath[1] to pull it apart and turn it into something a database understand. -- Sam http://samason.me.uk/

Re: [GENERAL] Import data from XML file

2009-08-26 Thread Edwin Plauchu
I think.. you'll need to parse that one... Where do you have your data types to xml document ? 2009/8/26 Erwin Brandstetter > Hi! > > How do you import data from an xml-file? > For instance, if I have a file like this: > > > > > > Sonstiges > 5 > > > Buehne

Re: [GENERAL] Import data from XML file

2009-08-26 Thread John R Pierce
Erwin Brandstetter wrote: Hi! How do you import data from an xml-file? For instance, if I have a file like this: Sonstiges 5 Buehne 2 Konzerte 1 Reggae 1 45 sonstige

[GENERAL] Import data from XML file

2009-08-26 Thread Erwin Brandstetter
Hi! How do you import data from an xml-file? For instance, if I have a file like this: Sonstiges 5 Buehne 2 Konzerte 1 Reggae 1 45 sonstige 5 44 ... and

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-26 Thread Christophe Pettus
SELECT * FROM tbl WHERE datanumber LIKE '%12345%' OR LIKE '%54321%' OR LIKE '%8766%' OR LIKE '%009%', .. The number of OR/LIKES are in the order of 50-100 items... the table tbl is a couple of million rows. Are the fixed strings in the wildcards "words" (i.e., are they completely arbitrar

Re: [GENERAL] How to simulate crashes of PostgreSQL?

2009-08-26 Thread Vick Khera
On Tue, Aug 25, 2009 at 4:55 PM, Tom Lane wrote: > I've always thought that the fd.c layer is more about not having to > configure the code explicitly for max-files-per-process limits.  Once > you get into ENFILE conditions, even if Postgres manages to stay up, > everything else on the box is going

[GENERAL] Aggregate function with Join stop working under certain condition

2009-08-26 Thread Naoko Reeves
I am joining 4 tables (doc, bpt, con, emp) - emp and doc relationship is one to many. I want to only one doc record per emp as condition shown below: The query below successfully returns desired result (returns 4 records): Select bpt_key, emp_full_name, con_full_name, max(doc_date_created) as

Re: [GENERAL] Tagged types module and varlena changes

2009-08-26 Thread Tom Lane
Alban Hertroys writes: > I changed it to: >> SET_VARSIZE(tv->vl_len_, a); This is just wrong; use SET_VARSIZE(tv, ...). >> memcpy( tv->vl_dat, &typev->val, b ); And I wouldn't recommend referencing vl_dat directly either. Use VARDATA(). In general you're supposed to apply VARSIZE() and VARDATA

Re: [GENERAL] ETL software and training

2009-08-26 Thread Alvaro Herrera
Lew wrote: > I used to work for a company called "MyWebOS" (later "WebOS"). > Spanish speakers thought that a very amusing name. I completely agree :-D -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 sup

Re: [GENERAL] Tagged types module and varlena changes

2009-08-26 Thread Alban Hertroys
On 26 Aug 2009, at 16:55, Alban Hertroys wrote: With the SET_VARSIZE the above should work *as long as datum is not toasted (or packed)*. If it's been detoasted then that's good, or if it was freshly generated and not stored in a tuple then it should be good too. I changed it to: struct

Re: [GENERAL] How to create a multi-column index with 2 dates using 'gist'?

2009-08-26 Thread Fred Janon
Thanks Gerhard, interesting but I wonder if it is a maintained project, the files date from May 2008 and there is not much forum activity. I'll out it on my list of "To be investigated". Fred On Wed, Aug 26, 2009 at 22:26, Gerhard Heift < ml-postgresql-20081012-3...@gheift.de> wrote: > But curre

Re: [GENERAL] Tagged types module and varlena changes

2009-08-26 Thread Alban Hertroys
On 26 Aug 2009, at 15:33, Greg Stark wrote: On Wed, Aug 26, 2009 at 1:14 PM, Alban Hertroys wrote: struct varlena* tv = (struct varlena*)tt_palloc( VARSIZE( datum ) ); tv->vl_len = VARSIZE( datum ) - sizeof(Oid); memcpy( tv->vl_dat, &((struct taggedtypev*)DatumGetPointer( datum ))->val,

Re: [GENERAL] How to create a multi-column index with 2 dates using 'gist'?

2009-08-26 Thread Gerhard Heift
On Mon, Aug 24, 2009 at 05:24:59PM +0800, Fred Janon wrote: > Hi, > > I am using 8.3 and pgAdmin III. I have a couple of tables using 2 DATE columns > like 'startdate' and 'enddate' (just date, not interested in time in these > columns). I have some queries (some using OVERLAPS) involving both 'st

Re: [GENERAL] Tagged types module and varlena changes

2009-08-26 Thread Greg Stark
On Wed, Aug 26, 2009 at 1:14 PM, Alban Hertroys wrote: >> struct varlena* tv = (struct varlena*)tt_palloc( VARSIZE( datum ) ); >> >> tv->vl_len = VARSIZE( datum ) - sizeof(Oid); >> memcpy( tv->vl_dat, >>        &((struct taggedtypev*)DatumGetPointer( datum ))->val, >>        VARSIZE(datum) - sizeof

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-26 Thread Ries van Twisk
The wildspeed function seems to be what I was looking for. an dI remember that I have seen it before on the list... just I couldn't remember names or anything... Ries On Aug 26, 2009, at 7:28 AM, Pavel Stehule wrote: 2009/8/26 : Hi Pavel, can you provide some link or other directions t

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-26 Thread Pavel Stehule
2009/8/26 : > Hi Pavel, > > can you provide some link or other directions to the proposal? I guess it > was posted to this list or somewhere else? Please, ask to Oleg Bartunov http://www.sai.msu.su/~megera/wiki/wildspeed regards Pavel Stehule > > Tomas > >> Hello >> >> one year ago there was p

[GENERAL] Tagged types module and varlena changes

2009-08-26 Thread Alban Hertroys
Hello all, I'm trying to get Marcel's tagged types to work, but I ran into some problems due to changes to the varlena type since he wrote that code. I tried contacting him personally earlier, but he's having some hardware issues apparently and can't help me; hence me asking here ;) The p

Re: [GENERAL] best practise/pattern for large OR / LIKE searches

2009-08-26 Thread tv
Hi Pavel, can you provide some link or other directions to the proposal? I guess it was posted to this list or somewhere else? Tomas > Hello > > one year ago there was proposal for index support for LIKE %some%. The > problem was extreme size of index size. > > I thing so you can write own C fun

Re: [GENERAL] [Skytools-users] WAL Shipping + checkpoint

2009-08-26 Thread Sébastien Lardière
On 26/08/2009 04:46, Mark Kirkwood wrote: Sébastien Lardière wrote: Hi All, I've a cluster ( Pg 8.3.7 ) with WAL Shipping, and a few hours ago, the master had to restart. I use walmgr from Skytools, which works very well. I have already restart the master without any problem, but today, the