Re: [GENERAL] Performance implications of creating many, many sequences

2010-10-22 Thread Craig Ringer
On 23/10/2010 3:18 AM, Michael Gardner wrote: Consider the following table: CREATE TABLE invoice ( account_id integer NOT NULL REFERENCES account, invoice_number integer NOT NULL, UNIQUE (account_id,invoice_number)); I would like to do the equivalent of making invoice_nu

Re: [GENERAL] Missing uuid_generate_v1()

2010-10-22 Thread Mike Christensen
Oh, BTW, Tom - You were right about symlinking.. What I did totally hosed Apache (though it didn't crash until 2 days later, then wouldn't restart).. Apache then griped about libuuid not loading. I had to get my friend Brian (Linux guru) to SSH in and clean up the whole mess I made.. I think no

Re: [GENERAL] how to get the height of index tree?

2010-10-22 Thread John R Pierce
On 10/22/10 11:50 AM, sunpeng wrote: what's the base of log_/a/ (/n/) function ? is that base a=16? or something else? how to know this base ? 2010/10/22 sunpeng mailto:blueva...@gmail.com>> Hi, how to get the height of R* or B tree of created index ? it would be based on how many i

Re: [GENERAL] Solaris install - "cannot compute sizeof (off_t)" error - readline issue?

2010-10-22 Thread John R Pierce
On 10/22/10 11:15 AM, gabrielle wrote: I'm trying to install postgres 8.4.5 on Solaris 10 (Sun): ./configure --prefix=/app/postgres-8.4.5 \ --with-libs=/app/usr/local/lib \ --with-includes=/app/usr/local/include (lib& include specified because I have readline installed in a non-standard locatio

Re: [GENERAL] Missing uuid_generate_v1()

2010-10-22 Thread Alexia Lau
Does anyone know where I can see what's already fixed at 9.0.2? Thanks, Alexia On 2010-10-07 09:54, Dave Page wrote: > On Thu, Oct 7, 2010 at 3:56 AM, Tom Lane wrote: > > Mike Christensen writes: > >> On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane wrote: > >>> If you have a libossp-uuid.so.16, you

Re: [GENERAL] auto fill serial id field with default value in copy operation

2010-10-22 Thread karsten vennemann
Yes it worked when I ommited the serial field in the copy command (and in the import source file). As a reference for others: COPY records (quad_id, species_id, observation_value) from '/var/www/data/data_import2.csv' using delimiters ',' with null as ''; Karsten > -Original Message

Re: [GENERAL] Gripe: bytea_output default => data corruption

2010-10-22 Thread ljb
vi...@khera.org wrote: >... > I had some hoops thru which I had to jump to make our app compatible with > both 8.x and 9.x so we could safely migrate our servers without having to > coordinate a code push. It wasn't that bad, but part of the problem is that > the DBD::Pg driver does not understand

Re: [GENERAL] Updates, deletes and inserts are very slow. What can I do make them bearable?

2010-10-22 Thread Tim Uckun
> It's unfortunate that the first response you got was that message from Gary > Chambers, which was a bit unprofessional and started the whole thread off in > a bad direction for you.  As what I've seen of Gary's posts suggests he is > trying to be helpful but has a quirky sense of humor, I think t

Re: [GENERAL] Solaris install - "cannot compute sizeof (off_t)" error - readline issue?

2010-10-22 Thread Gary Chambers
Gabrielle, > I'm trying to install postgres 8.4.5 on Solaris 10 (Sun): > ./configure --prefix=/app/postgres-8.4.5 \ > --with-libs=/app/usr/local/lib \ > --with-includes=/app/usr/local/include First and foremost, I would highly recommend that you use the Sun compiler to build it. Jignesh Shah had

Re: [GENERAL] auto fill serial id field with default value in copy operation

2010-10-22 Thread Tom Lane
"karsten vennemann" writes: > What is the best way to load my data via copy into the db and get the > record_id field auto filled (with the next id value in squence) ? You have to omit the column from the copy data altogether, and then list just the columns that are supplied in the data in the C

[GENERAL] auto fill serial id field with default value in copy operation

2010-10-22 Thread karsten vennemann
I'm trying to load data from a csv file via copy command into a table with the first column record_id specified NOT NULL (this is a serial field defined as follows: ALTER TABLE records ADD COLUMN record_id integer; ALTER TABLE records ALTER COLUMN record_id SET STORAGE PLAIN; ALTER TABLE recor

[GENERAL] Tools for form generation in PHP/HTML from database models/queries

2010-10-22 Thread Andre Lopes
Hi, I need to do some repetitive work in form creation to insert, update and delete data from the database. There are some tools that handle with form creation from a PostgreSQL database? PS: Sorry my English. Best Regards,

Re: [GENERAL] Performance implications of creating many, many sequences

2010-10-22 Thread Michael Gardner
On Oct 22, 2010, at 2:50 PM, Rob Sargent wrote: > Is this "invoice_number" just an id or what might appear an a bill (in > some pretty form etc)? It will appear on actual invoices, as part of a compound invoice identifier (like ABCD-0042, where ABCD is an identifier for the account in question a

Re: [GENERAL] Performance implications of creating many, many sequences

2010-10-22 Thread Rob Sargent
Is this "invoice_number" just an id or what might appear an a bill (in some pretty form etc)? If the former, just get a unique id over all invoices. At the very least it will save time i) in writing where clauses ii) re-creating the correct id once some one assigns an invoice to the wrong custome

[GENERAL] Performance implications of creating many, many sequences

2010-10-22 Thread Michael Gardner
Consider the following table: CREATE TABLE invoice ( account_id integer NOT NULL REFERENCES account, invoice_number integer NOT NULL, UNIQUE (account_id,invoice_number)); I would like to do the equivalent of making invoice_number a serial type, but on a per-account basis.

Re: [GENERAL] how to get the height of index tree?

2010-10-22 Thread sunpeng
what's the base of log*a*(*n*) function ? is that base a=16? or something else? how to know this base ? 2010/10/22 sunpeng > Hi, how to get the height of R* or B tree of created index ? >

[GENERAL] how to get the height of index tree?

2010-10-22 Thread sunpeng
Hi, how to get the height of R* or B tree of created index ?

[GENERAL] Solaris install - "cannot compute sizeof (off_t)" error - readline issue?

2010-10-22 Thread gabrielle
I'm trying to install postgres 8.4.5 on Solaris 10 (Sun): ./configure --prefix=/app/postgres-8.4.5 \ --with-libs=/app/usr/local/lib \ --with-includes=/app/usr/local/include (lib & include specified because I have readline installed in a non-standard location. Yay.) This fails with this error: ch

[GENERAL] Another PostgreSQL Diff Tool 2.3 released

2010-10-22 Thread Miroslav Šulc
Another PostgreSQL Diff Tool 2.3 released - Another PostgreSQL Diff Tool (also known as apgdiff) is free PostgreSQL database schema diff tool. Project homepage: http://apgdiff.startnet.biz/ Release information --- This release brings two n

Re: [GENERAL] pg view of table columns needed for scripting

2010-10-22 Thread Chris Barnes
From: dave.gauth...@intel.com To: pgsql-general@postgresql.org Date: Fri, 22 Oct 2010 09:14:01 -0700 Subject: [GENERAL] pg view of table columns needed for scripting Hi: Is there something like a pg_xxx view that I can use to get the column names and data types of a table, si

Re: [GENERAL] pg view of table columns needed for scripting

2010-10-22 Thread bricklen
On Fri, Oct 22, 2010 at 9:14 AM, Gauthier, Dave wrote: > Is there something like a pg_xxx view that I can use to get the column names > and data types of a table, similar to what I see with \d ?  I need to run > this is a script, so \d isn't viable.  I did a \df and looked around, but > nothing po

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-22 Thread Peter Bex
On Fri, Oct 22, 2010 at 08:20:11PM +0400, Dmitriy Igrishin wrote: > Hey Peter, Hello Dmitriy, > > As far as I can see, this would imply either creating views on the > > for every user (or company?), or manually crafting queries > > to do the same. The latter is of course what most webapps do, an

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-22 Thread Dmitriy Igrishin
Hey Peter, 2010/10/22 Peter Bex > On Fri, Oct 22, 2010 at 12:21:17AM +0400, Dmitriy Igrishin wrote: > > Hey Tony, > > > > 2010/10/21 Tony Cebzanov > > > > > I have a web application with a Postgres backend. In my initial > > > prototype, I decided not to have a Postgres database user created f

Re: [GENERAL] Gripe: bytea_output default => data corruption

2010-10-22 Thread Vick Khera
On Thu, Oct 21, 2010 at 7:12 PM, ljb wrote: > Again: My complaint is that pre-9.0 libpq-based clients mis-decode the new > default hex format bytea data without reporting an error, and this danger > is > insufficiently documented in the release notes. > I had some hoops thru which I had to jump

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-22 Thread Peter Bex
On Fri, Oct 22, 2010 at 12:21:17AM +0400, Dmitriy Igrishin wrote: > Hey Tony, > > 2010/10/21 Tony Cebzanov > > > I have a web application with a Postgres backend. In my initial > > prototype, I decided not to have a Postgres database user created for > > each application user, opting instead to

[GENERAL] pg view of table columns needed for scripting

2010-10-22 Thread Gauthier, Dave
Hi: Is there something like a pg_xxx view that I can use to get the column names and data types of a table, similar to what I see with \d ? I need to run this is a script, so \d isn't viable. I did a \df and looked around, but nothing popped out. Thanks in Advance !

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-22 Thread Dmitriy Igrishin
Hey Tony, 2010/10/22 Tony Cebzanov > Hi Dmitriy, > > On 10/21/10 4:21 PM, Dmitriy Igrishin wrote: > > IMO, you are trying to reinvent the wheel. Although, you may do it just > for > > fun. :-) > > Surely I am, but I think it made sense at the time. It doesn't make as > much sense now that I nee

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-22 Thread Tony Cebzanov
Hi Dmitriy, On 10/21/10 4:21 PM, Dmitriy Igrishin wrote: > IMO, you are trying to reinvent the wheel. Although, you may do it just for > fun. :-) Surely I am, but I think it made sense at the time. It doesn't make as much sense now that I need to audit every insert/update/delete in the database.

Re: [GENERAL] Is there a plugin/script for nagios that monitors pitr being up to djavascript:;ate?

2010-10-22 Thread Chris Barnes
> On Fri, 2010-10-22 at 08:37 -0400, Chris Barnes wrote: > > Is the a plugin or script that will allow pitr to be monitored and > > trigger an alarm when the pitr master/slave databases > > get out of sync? > > > > The reason I'm asking, I have had one or four of pitr'd slaves get out > > of syn

Re: [GENERAL] Updates, deletes and inserts are very slow. What can I do make them bearable?

2010-10-22 Thread Greg Smith
Tim Uckun wrote: I asked a question and the first reply was really snarky and unhelpful. It's unfortunate that the first response you got was that message from Gary Chambers, which was a bit unprofessional and started the whole thread off in a bad direction for you. As what I've seen of G

Re: [GENERAL] Is there a plugin/script for nagios that monitors pitr being up to djavascript:;ate?

2010-10-22 Thread Devrim GÜNDÜZ
On Fri, 2010-10-22 at 08:37 -0400, Chris Barnes wrote: > Is the a plugin or script that will allow pitr to be monitored and > trigger an alarm when the pitr master/slave databases > get out of sync? > > The reason I'm asking, I have had one or four of pitr'd slaves get out > of sync twice? > Not s

[GENERAL] Is there a plugin/script for nagios that monitors pitr being up to djavascript:;ate?

2010-10-22 Thread Chris Barnes
Is the a plugin or script that will allow pitr to be monitored and trigger an alarm when the pitr master/slave databases get out of sync? The reason I'm asking, I have had one or four of pitr'd slaves get out of sync twice? Not sure why, it may have something to do with rsync on (wal log txfr),

[GENERAL] Fwd: [PERFORM] Clean up of archived Xlogs in postgres-9.

2010-10-22 Thread Nimesh Satam
Hi all, We are trying to use the streaming replication of postgres9 and hence we archive the WAL logs in the archive location. But we are not able find the right documentation to clean the archive location. As suggested by Erik Rijkers we tried using the pg_archivecleanup but we are not sure, fr

[GENERAL] Debugger log

2010-10-22 Thread Carlos Henrique Reimer
Hi, After starting the debugger in a PostgreSQL 8.3 running in Windows 2003 SP2 box I'm getting in the log a lot of the following message: LOG: loaded library "$libdir/plugins/plugin_debugger.dll Configuration option changed to start the debugger: shared_preload_libraries = '$libdir/plugins/plug

Re: [GENERAL] Question on Explain : Index Scan

2010-10-22 Thread Mathieu De Zutter
On Thu, Oct 21, 2010 at 8:51 PM, DM wrote: > Why is the difference in query plan, and the total runtime. Both tables have > the same  btree index > > > test=# explain analyze select * from test_seqindex1 where sid='AA023'; > QUERY > PLAN

Re: [GENERAL] Updates, deletes and inserts are very slow. What can I do make them bearable?

2010-10-22 Thread Tim Uckun
> Agreed.  But when Tom pointed out the problem in your query you were > quite sure you couldn't be wrong.  When I asked you to run explain to > see what kind of row estimate you got, I got no answer.  This was a > query problem not a hardware tuning problem. > > The best step for getting a good an

Re: [GENERAL] compile error in libpq program

2010-10-22 Thread John R Pierce
On 10/21/10 9:14 PM, zab08 wrote: more detail? I don't understand. please send responses to the mail list so others can contribute. libpq is only one piece of postgres, and building it has to be done in the context of the rest of the postgres build environment, you can't just manually compi