Re: [GENERAL] Restore/dump from "/usr/local/pgsql/data" directory

2010-09-24 Thread kongsgar
To specify: I have a copy of the data in "/usr/local/pgsql/data" from my old, but I don't have access to the old system anymore so I cannot simply do a "pg_dumpall" from there. I believe I could copy the content of "/usr/local/pgsql/data" into "/usr/local/pgsql/data" on my new system. But is

[GENERAL] Favourable index type for varbit field

2010-09-24 Thread Allan Kamau
Hi, I do have a table having a varbit field, on this varbit field I am performing filteration using bit_and and bit_or operators. Is there an index type that would be of use towards speeding up these operations (bit_and, bit_or). Allan. -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] Restore/dump from "/usr/local/pgsql/data" directory

2010-09-24 Thread Craig Ringer
On 24/09/2010 3:24 PM, kongs...@stud.ntnu.no wrote: To specify: I have a copy of the data in "/usr/local/pgsql/data" from my old, but I don't have access to the old system anymore so I cannot simply do a "pg_dumpall" from there. I believe I could copy the content of "/usr/local/pgsql/data" into

Re: [GENERAL] Restore/dump from "/usr/local/pgsql/data" directory

2010-09-24 Thread kongsgar
What version of PG was it? The "PG_VERSION" file = 8.3 -Håvard Wahl Kongsgård Siterer Raymond O'Donnell : On 24/09/2010 08:24, kongs...@stud.ntnu.no wrote: To specify: I have a copy of the data in "/usr/local/pgsql/data" from my old, but I don't have access to the old system anymore so I can

Re: [GENERAL] Restore/dump from "/usr/local/pgsql/data" directory

2010-09-24 Thread Raymond O'Donnell
On 24/09/2010 13:21, kongs...@stud.ntnu.no wrote: What version of PG was it? The "PG_VERSION" file = 8.3 OK, well at least it's not an ancient version that's not available any more. :-) As Craig said, the best thing is to get hold of a copy of 8.3 that matches the architecture of the old s

[GENERAL] Libpq memory leak

2010-09-24 Thread Polyakov Vladimir
Program written in C using Libpq, which receives large files (BYTEA) has a memory leak. I need to free ALL of the used memory after each sql query. after each call PQclear() I drop the buffer: conn->inBuffer = realloc(conn->inBuffer, 8192); conn->inBufSize = 8192; It works, but .. I notic

Re: [GENERAL] Libpq memory leak

2010-09-24 Thread Tom Lane
Polyakov Vladimir writes: > Program written in C using Libpq, which receives large files (BYTEA) > has a memory leak. > I need to free ALL of the used memory after each sql query. > after each call PQclear() I drop the buffer: > conn->inBuffer = realloc(conn->inBuffer, 8192); > conn->inBu

Re: [GENERAL] Libpq memory leak

2010-09-24 Thread Dmitriy Igrishin
Hey Vladimir, 2010/9/24 Polyakov Vladimir > Program written in C using Libpq, which receives large files (BYTEA) > has a memory leak. > I need to free ALL of the used memory after each sql query. > > after each call PQclear() I drop the buffer: >conn->inBuffer = realloc(conn->inBuffer, 819

Re: [GENERAL] Libpq memory leak

2010-09-24 Thread Bret S. Lambert
On Fri, Sep 24, 2010 at 06:11:31PM +0400, Dmitriy Igrishin wrote: > Hey Vladimir, > > > > 2010/9/24 Polyakov Vladimir > > > Program written in C using Libpq, which receives large files (BYTEA) > > has a memory leak. > > I need to free ALL of the used memory after each sql query. > > > > after

[GENERAL] Creating a column interger with default to not null

2010-09-24 Thread Chris Barnes
I am confused with what this is telling me. I have a table and I am trying to add a new column with constraint not null. What am I missing? Chris pgdb001=> alter table schema.table add COLUMN column_name integer not null; ERROR: column "column_name" contains null values

[GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Wang, Mary Y
Hi All, We are starting a new project in my organization and need to have a database. I proposed that we use PostgreSQL. Because we already have the Oracle infrastructure in-house, I'm told that I need to do a simple trade study on Oracle vs. PostgreSQL. Based on the database requirements, i

Re: [GENERAL] Creating a column interger with default to not null

2010-09-24 Thread Thom Brown
On 24 September 2010 16:05, Chris Barnes wrote: > > I am confused with what this is telling me. > I have a table and I am trying to add a new column with constraint not null. > > > What am I missing? > Chris > > > pgdb001=> alter table schema.table add COLUMN column_name integer not null; > ERROR:

Re: [GENERAL] Restore/dump from "/usr/local/pgsql/data" directory

2010-09-24 Thread Craig Ringer
On 24/09/2010 8:40 PM, Raymond O'Donnell wrote: On 24/09/2010 13:21, kongs...@stud.ntnu.no wrote: What version of PG was it? The "PG_VERSION" file = 8.3 OK, well at least it's not an ancient version that's not available any more. :-) As Craig said, the best thing is to get hold of a copy of

Re: [GENERAL] Creating a column interger with default to not null

2010-09-24 Thread Adrian Klaver
On Friday 24 September 2010 8:05:43 am Chris Barnes wrote: > I am confused with what this is telling me. > I have a table and I am trying to add a new column with constraint not > null. > > > What am I missing? > Chris > > > pgdb001=> alter table schema.table add COLUMN column_name integer not null

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Steve Atkins
On Sep 24, 2010, at 7:52 AM, Wang, Mary Y wrote: > Hi All, > > We are starting a new project in my organization and need to have a database. > I proposed that we use PostgreSQL. Because we already have the Oracle > infrastructure in-house, I'm told that I need to do a simple trade study on

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Gauthier, Dave
There's also the "ease of use" issue. I've worked with Oracle in the past. Postgres is a breeze in comparison. This is more than just looking for the easy way out. The learning curves, classes and support issues all equate to $$. As for performance, I couldn't say. But I will say that tunin

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Scott Marlowe
On Fri, Sep 24, 2010 at 9:56 AM, Steve Atkins wrote: > Again, you'd need to run them on comparable hardware and tune them both well. Actually I'd argue that pgsql gets better hardware since you can spend the money you'd spend on oracle licenses on hardware for pgsql. At $20k per cpu on oracle (

[GENERAL] Front End Application (OFF-TOPIC)

2010-09-24 Thread Carlos Mennens
I am using PostgreSQL to hold my entire I.T. inventory for my company. I am manually entering the data in via hand through the Linux command line and the 'psql' utility which is great for me but other co-workers in I.T. have no understanding of how to view the schema and I wanted to see if anyone h

Re: [GENERAL] Front End Application (OFF-TOPIC)

2010-09-24 Thread Joshua D. Drake
On Fri, 2010-09-24 at 13:15 -0400, Carlos Mennens wrote: > I am using PostgreSQL to hold my entire I.T. inventory for my company. > I am manually entering the data in via hand through the Linux command > line and the 'psql' utility which is great for me but other co-workers > in I.T. have no unders

Re: [GENERAL] Front End Application (OFF-TOPIC)

2010-09-24 Thread Leif Biberg Kristensen
On Friday 24. September 2010 19.15.39 Carlos Mennens wrote: > I am using PostgreSQL to hold my entire I.T. inventory for my company. > I am manually entering the data in via hand through the Linux command > line and the 'psql' utility which is great for me but other co-workers > in I.T. have no und

[GENERAL] Avoiding in underflow in double -> real conversions

2010-09-24 Thread David Wilson
List- I've got a calculation that, due to its use of exp(), is produces double precision intermediate results which I ultimately need to cast back to real to store in a table column. However, with certain inputs, this results in an underflow error. Is there any way outside of an exception-trapping

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Lincoln Yeoh
At 12:20 AM 9/25/2010, Scott Marlowe wrote: On Fri, Sep 24, 2010 at 9:56 AM, Steve Atkins wrote: > Again, you'd need to run them on comparable hardware and tune them both well. Actually I'd argue that pgsql gets better hardware since you can spend the money you'd spend on oracle licenses on

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Scott Ribe
On Sep 24, 2010, at 12:04 PM, Lincoln Yeoh wrote: > No bullshit *THAT*, for me, was one of the most attractive aspects of the community. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-general mailing list (pgsql-general@postgr

[GENERAL] pgcluster

2010-09-24 Thread prof_cleverson
PGCluster installed but when connecting to the Load Balancer gives the error: Error connect to server:server closed the connection unexpectedly This probably means the server terminated abnormally before or while process the request in pgreplicate debug: PGRread_query():unexpected EOF -- Sent

[GENERAL] UPDATE/DELETE with ORDER BY and LIMIT

2010-09-24 Thread Bartłomiej Korupczyński
Hi guys, I've found some posts from 2007 about UPDATE/DELETE ... LIMIT N syntax and I'd like to raise it again. Current PostgreSQL of UPDATE/DELETE implement RETURNING statement, so extending by ORDER and LIMIT would be really useful. Let's say we need to reserve some kind of identifier for user.

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Scott Marlowe
On Fri, Sep 24, 2010 at 12:04 PM, Lincoln Yeoh wrote: > At 12:20 AM 9/25/2010, Scott Marlowe wrote: >> >> On Fri, Sep 24, 2010 at 9:56 AM, Steve Atkins wrote: >> >  Again, you'd need to run them on comparable hardware and tune them both >> > well. >> >> Actually I'd argue that pgsql gets better h

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Leif Biberg Kristensen
On Friday 24. September 2010 20.04.26 Lincoln Yeoh wrote: > Then again, does Tom ever sleep? Maybe he sleeps in the afternoon? Or > is that when he does intensive coding? Once there was a suggestion on this list to give Tom every other week off to level the competition with the other RDBMSes.

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Joshua D. Drake
On Fri, 2010-09-24 at 22:55 +0200, Leif Biberg Kristensen wrote: > On Friday 24. September 2010 20.04.26 Lincoln Yeoh wrote: > > > Then again, does Tom ever sleep? Maybe he sleeps in the afternoon? Or > > is that when he does intensive coding? > > Once there was a suggestion on this list to give

[GENERAL] Exclusion constraint issue

2010-09-24 Thread Eric McKeeth
I'm getting an error message that doesn't make sense to me. Using PostgreSQL 9.0.0 on CentOS 5.5. Given the following table and function definitions CREATE TABLE test3 ( test3_id serial NOT NULL, fk_id integer, data_3 text, effect_date date NOT NULL, expire_date date NOT NULL, CONSTR

Re: [GENERAL] Exclusion constraint issue

2010-09-24 Thread Tom Lane
Eric McKeeth writes: > why would I get the following error, since the period() function is in fact > declared as immutable? > test=# ALTER TABLE test3 ADD exclude using > gist(period(effect_date::timestamptz, expire_date::timestamptz) with && ); > ERROR: functions in index expression must be mar

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Leif Biberg Kristensen
On Friday 24. September 2010 23.03.21 Joshua D. Drake wrote: > DUDE! Are you trying to kill the postgresql company's business? :P Huh? Is there a company? :P The REALLY great thing about PostgreSQL is the free sharing. Back in 2002 when I discovered that all the software that I considered cool w

[GENERAL] exclude constraints with same name?

2010-09-24 Thread A.M.
I found some surprising behavior with the new EXCLUDE constraint in 9.0.0- it seems that EXCLUDE constraint names have to be unique across tables: test=# BEGIN; BEGIN test=# CREATE TABLE a(a INTEGER); CREATE TABLE test=# CREATE TABLE b(b INTEGER); CREATE TABLE test=# ALTER TABLE a ADD CONSTRAINT

Re: [GENERAL] pg 8.4 crashing.

2010-09-24 Thread Scott Marlowe
On Fri, Sep 24, 2010 at 5:06 PM, Scott Marlowe wrote: > On Thu, Sep 23, 2010 at 8:57 PM, Scott Marlowe > wrote: >> On Thu, Sep 23, 2010 at 2:17 PM, Tom Lane wrote: >>> Scott Marlowe writes: I've got a problem with pg 8.4.4 crashing with a sig 6 abort due to a panic on failing to add

[GENERAL] psql copy command - 1 char limitation on delimiter

2010-09-24 Thread rey
Hi, /delimiter/ The single character that separates columns within each row (line) of the file. The default is a tab character in text mode, a comma in CSV mode. Why limit this to a single character? For easy of use, should it be lifted, so we can specify such as '|*|'? Rey

Re: [GENERAL] exclude constraints with same name?

2010-09-24 Thread Jeff Davis
On Fri, 2010-09-24 at 19:05 -0400, A.M. wrote: > I found some surprising behavior with the new EXCLUDE constraint in > 9.0.0- it seems that EXCLUDE constraint names have to be unique across > tables: > That's consistent with UNIQUE constraints. It has to do with whether the constraint is enforced

Re: [GENERAL] Libpq memory leak

2010-09-24 Thread Sergey Burladyan
Tom Lane writes: > Polyakov Vladimir writes: > > Program written in C using Libpq, which receives large files (BYTEA) > > has a memory leak. > > I need to free ALL of the used memory after each sql query. I discussed this yesterday with Vladimir. I think Vladimir trying to complain about behavi

[GENERAL] Listen and do something daemon

2010-09-24 Thread KM
Does this program already exist? $ listen-and-do --database=foo --listen-for="somenotification" \ --then-do="some-script" It will daemonize itself, issue a 'LISTEN somenotification' on the database foo, and on each NOTIFY will run some-script. Thanks -- KM -- Sent via pgsql-general m

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Craig Ringer
On 25/09/2010 4:55 AM, Leif Biberg Kristensen wrote: On Friday 24. September 2010 20.04.26 Lincoln Yeoh wrote: Then again, does Tom ever sleep? Maybe he sleeps in the afternoon? Or is that when he does intensive coding? Once there was a suggestion on this list to give Tom every other week off

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Uwe Schroeder
> On 25/09/2010 4:55 AM, Leif Biberg Kristensen wrote: > > On Friday 24. September 2010 20.04.26 Lincoln Yeoh wrote: > >> Then again, does Tom ever sleep? Maybe he sleeps in the afternoon? Or > >> is that when he does intensive coding? > > > > Once there was a suggestion on this list to give Tom

Re: [GENERAL] Trade Study on Oracle vs. PostgreSQL

2010-09-24 Thread Pavel Stehule
2010/9/25 Uwe Schroeder : > > >> On 25/09/2010 4:55 AM, Leif Biberg Kristensen wrote: >> > On Friday 24. September 2010 20.04.26 Lincoln Yeoh wrote: >> >> Then again, does Tom ever sleep? Maybe he sleeps in the afternoon? Or >> >> is that when he does intensive coding? >> > >> > Once there was a su