Re: [GENERAL] LOCK TABLE permission requirements

2011-06-30 Thread Florian Weimer
* Josh Kupershmidt: > On Wed, Jun 29, 2011 at 7:48 AM, Florian Weimer wrote: >> I've been looking around in the 9.0 documentation, but couldn't find the >> permission requirements for LOCK TABLE (in particular, LOCK TABLE IN >> SHARE MODE).  From the source, you need at least one of UPDATE, DELET

Re: [GENERAL] How did I get 8 Exclusive locks on the same table? And how many locks is too many?

2011-06-30 Thread Guillaume Lelarge
On Wed, 2011-06-29 at 16:39 -0400, Bill Moran wrote: > In response to Aleksey Tsalolikhin : > > > > We use the fine Bucardo check_postgres Nagios plugin, > > and it reported a "CRITICAL" level spike in database locks > > (171 locks). > > > > I looked closely at my database logs and found an eve

Re: [GENERAL] Windows x64 : How do I get OSSP-UUID.sql contrib for postgresql x64

2011-06-30 Thread Magnus Hagander
On Thu, Jun 30, 2011 at 02:39, Craig Ringer wrote: > On 30/06/2011 12:42 AM, Michael Gould wrote: > > Grace the ossp-uuid libraries have no make system to create a 64 bit version > and I guess there are some technical reasons with the compiler.  You can run > them on Linux 64 bit and Windows 32 bi

[GENERAL] question about query

2011-06-30 Thread Linos
Hi, i am trying to obtain from the database what we have been doing in a excel sheet from some time. I have some tables where i store the documents associated with our customers, invoices, payments and others, what i need to get from this tables it is a movement log where i can get what paym

Re: [GENERAL] question about query

2011-06-30 Thread Craig Ringer
On 30/06/2011 9:00 PM, Linos wrote: how could i calculate this pending column that does not exists in the database and i need to be based on last result row? I would like to get with raw SQL but the need to use any procedural language would not be a problem. Without knowing how you've structu

Re: [GENERAL] question about query

2011-06-30 Thread Linos
sorry, i have more searching for a way to do something like this but i should have posted the tables anyway, i have any more documents but all have a structure like this: invoices: CREATE TABLE factura ( id_factura serial NOT NULL, -- invoice id id_cliente integer NOT NULL, -- customer

Re: [GENERAL] question about query

2011-06-30 Thread David Johnston
Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Linos Sent: Thursday, June 30, 2011 9:00 AM To: pgsql-general@postgresql.org Subject: [GENERAL] question about query Hi, i am trying to obtain from the database what

Re: [GENERAL] Windows x64 : How do I get OSSP-UUID.sql contrib for postgresql x64

2011-06-30 Thread Grace Batumbya
Hey Hiroshi, Do you have a make file to compile for x64 windows? May be if that is made available then ossp-uuid for x64 versions will become standard. *Grace Batumbya* Research Assistant | Seneca CDOT Phone: 416-491-5050 x3548 cdot.senecac.on.ca On 6/29/2011 1:02

[GENERAL] When the Session ends in PGSQL?

2011-06-30 Thread Durumdara
Hi! I asked same thing in the list formerly, http://archives.postgresql.org/pgsql-general/2011-06/msg00888.php And because of lack of answers now I asked here also: http://stackoverflow.com/questions/6534654/postgresql-session-timeout I'm very wondering that I don't (and can't) found a system va

[GENERAL] VACUUM FULL cannot be VERBOSE?

2011-06-30 Thread Miroslav Šulc
hi, is it correct behavior that when i issue command "VACUUM VERBOSE", i get output with DETAIL info, but when i issue "VACUUM FULL VERBOSE", no details are displayed? here are some samples: VACUUM VERBOSE; INFO: vacuuming "pg_catalog.pg_type" INFO: scanned index "pg_type_oid_index" to remove

Re: [GENERAL] When the Session ends in PGSQL?

2011-06-30 Thread Andrew Sullivan
On Thu, Jun 30, 2011 at 04:11:32PM +0200, Durumdara wrote: > Hi! > > I asked same thing in the list formerly, > http://archives.postgresql.org/pgsql-general/2011-06/msg00888.php > I'm very wondering that I don't (and can't) found a system variable > that define the timeout of the client session.

Re: [GENERAL] Windows x64 : How do I get OSSP-UUID.sql contrib for postgresql x64

2011-06-30 Thread Hiroshi Saito
Hi Grace-san. It is the same as windows. http://winpg.jp/~saito/pg_work/OSSP_win32/ 1. Deployment of tar.gz 2. apply the patch 3. configure and build by Linux or MinGW 4. config.h and win32.mak are set at the head of a source tree. 5. nmake -f win32.mak It can be used by 32 bits and 64 bits. Re

Re: [GENERAL] question about query

2011-06-30 Thread Linos
El 30/06/11 15:44, David Johnston escribió: Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Linos Sent: Thursday, June 30, 2011 9:00 AM To: pgsql-general@postgresql.org Subject: [GENERAL] question about query Hi,

[GENERAL] Contrib source

2011-06-30 Thread gnuoytr
So, I needed to build a special PG, for use with xTuple (an ERP). I got the 8.4.4 source, dumped it in a directory in my home, and put the executable out on a non-standard directory on one of my SSD. Reading Greg Smith's "High Performance..." book, suggested that I needed the postgresql-contri

Re: [GENERAL] Contrib source

2011-06-30 Thread Reid Thompson
On Thu, 2011-06-30 at 10:46 -0400, gnuo...@rcn.com wrote: > I'll need the contrib source, and I don't find it anywhere. I must not be > looking in the right place. > > Where might that be? http://www.postgresql.org/ftp/source/ -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] When the Session ends in PGSQL?

2011-06-30 Thread Bill Moran
In response to Durumdara : > Hi! > > I asked same thing in the list formerly, > http://archives.postgresql.org/pgsql-general/2011-06/msg00888.php > > And because of lack of answers now I asked here also: > http://stackoverflow.com/questions/6534654/postgresql-session-timeout > > I'm very wonder

Re: [GENERAL] Contrib source

2011-06-30 Thread gnuoytr
D'oh! I didn't recall that it was packaged together, but the contrib source isn't in src, where I looked. Oh well. thanks, Robert Original message >Date: Thu, 30 Jun 2011 11:04:43 -0400 >From: Reid Thompson >Subject: Re: [GENERAL] Contrib source >To: gnuo...@rcn.com >Cc: pgsql-g

Re: [GENERAL] question about query

2011-06-30 Thread Linos
El 30/06/11 15:44, David Johnston escribió: Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Linos Sent: Thursday, June 30, 2011 9:00 AM To: pgsql-general@postgresql.org Subject: [GENERAL] question about query Hi,

Re: [GENERAL] When the Session ends in PGSQL?

2011-06-30 Thread Durumdara
Hi! 2011/6/30 Bill Moran : > In response to Durumdara : > > Session ends when the connection is terminated.  I.e., a PostgreSQL > session is synonymous with a TCP connection (or domain socket in some > cases). In Windows OS what's this meaning? I know there is a difference between Win's and Lin's

Re: [GENERAL] When the Session ends in PGSQL?

2011-06-30 Thread Bill Moran
In response to Durumdara : > Hi! > > 2011/6/30 Bill Moran : > > In response to Durumdara : > > > > Session ends when the connection is terminated.  I.e., a PostgreSQL > > session is synonymous with a TCP connection (or domain socket in some > > cases). > > In Windows OS what's this meaning? > I

Re: [GENERAL] Contrib source

2011-06-30 Thread Michael Nolan
On Thu, Jun 30, 2011 at 10:17 AM, wrote: > D'oh! I didn't recall that it was packaged together, but the contrib > source isn't in src, where I looked. Oh well. > IIt's not a separate file, there should be a contrib subdirectory in the source code file. However, if you're using a packaged pre-

Re: [GENERAL] Contrib source

2011-06-30 Thread gnuoytr
I just got wholly confused. Synaptic makes it appear that *contrib is a separate entity. And the source isn't in a src subdirectory, but in the contrib directory directly. If I built PG on a regular basis, I might remember all this. The xTuple folks only support a few PG releases, and with a

Re: [GENERAL] Contrib source

2011-06-30 Thread Adrian Klaver
On Thursday, June 30, 2011 9:48:57 am gnuo...@rcn.com wrote: > I just got wholly confused. Synaptic makes it appear that *contrib is a > separate entity. And the source isn't in a src subdirectory, but in the > contrib directory directly. If I built PG on a regular basis, I might > remember all

Re: [GENERAL] VACUUM FULL cannot be VERBOSE?

2011-06-30 Thread Marti Raudsepp
2011/6/30 Miroslav Šulc : > is it correct behavior that when i issue command "VACUUM VERBOSE", i get > output with DETAIL info, but when i issue "VACUUM FULL VERBOSE", no > details are displayed? Yes, this seems OK. PostgreSQL 9.0 has a new implementation of VACUUM FULL, which behaves more like CL

[GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread Dmitry Koterov
Hello. I need to create an auto-increment field on a table WITHOUT using sequences: CREATE TABLE tbl( name TEXT, uniq_id INTEGER ); Each INSERT to this table must generate a new uniq_id which is distinct from all others. The problem is that these INSERTs are rolled back oftenly (i.e. they a

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread salah jubeh
Hello, This is an ugly hack. Try to have a temporary holder that carries the maximum value. for example create a table with a one columnn and certainly one row and synchronize this value with your sequence Regards From: Dmitry Koterov To: Postgres Gener

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread A.M.
On Jun 30, 2011, at 2:40 PM, Dmitry Koterov wrote: > Hello. > > I need to create an auto-increment field on a table WITHOUT using sequences: This problem pops up a lot for invoice sequence numbers for the tax office and related cases. (Search for "gapless sequence".) Since the numbers are re

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread Dmitry Koterov
Thank you. It may not be "fully" gapless. The main cause is to keep uniq_id as low as it could be to not to exhaust 10 values too fast. I think solutions with addition tables look too complicated for this case, is there a possiblilty to not to use an additional table? On Thu, Jun 30, 2011 at

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Dmitry Koterov Sent: Thursday, June 30, 2011 2:41 PM To: Postgres General Subject: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object? Hello. I need to create an auto-incr

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread George Weaver
Original Message From: Dmitry Koterov I need to create an auto-increment field on a table WITHOUT using sequences: You may get some ideas at http://www.varlena.com/GeneralBits/130.php George -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

[GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread Dmitry Koterov
Hello. I need to create an auto-increment field on a table WITHOUT using sequences: CREATE TABLE tbl( name TEXT, uniq_id INTEGER ); Each INSERT to this table must generate a new uniq_id which is distinct from all others. The problem is that these INSERTs are rolled back oftenly (i.e. they a

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread Dmitriy Igrishin
Hey Dmitry, 2011/6/30 Dmitry Koterov > Hello. > > I need to create an auto-increment field on a table WITHOUT using > sequences: > > CREATE TABLE tbl( > name TEXT, > uniq_id INTEGER > ); > > Each INSERT to this table must generate a new uniq_id which is distinct > from all others. > > The pr

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread Scott Marlowe
On Thu, Jun 30, 2011 at 12:40 PM, Dmitry Koterov wrote: > Hello. > I need to create an auto-increment field on a table WITHOUT using sequences: > CREATE TABLE tbl( >   name TEXT, >   uniq_id INTEGER > ); > Each INSERT to this table must generate a new uniq_id which is distinct from > all others.

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread Dmitry Koterov
Thanks to all, I'll try to live with this solution. (It is not ideal, but pretty good for my case.) The better way may be to create an additional table with ANY structure and no data and LOCK using it, but not the "tbl" table. It theoretically decrease race conditions - the only thing which I need

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread Greg Smith
On 06/30/2011 03:01 PM, Dmitry Koterov wrote: It may not be "fully" gapless. The main cause is to keep uniq_id as low as it could be to not to exhaust 10 values too fast. I think solutions with addition tables look too complicated for this case, is there a possiblilty to not to use an addi

Re: [GENERAL] Inheritence issue scheme advice?

2011-06-30 Thread Casey Havenor
Ok - loaded up Linux - fun stuff. Figured out how to get the code PostgreSQL version 9.0.4 - Have that in a directory. Got the patch from above... Placed into same directory. Loaded the dependents for the final compile and install with .configure. BUT When I run the patch I'm getting some

Re: [GENERAL] Contrib source

2011-06-30 Thread Craig Ringer
On 07/01/2011 12:48 AM, gnuo...@rcn.com wrote: I just got wholly confused. Synaptic makes it appear that *contrib is a separate entity. And the source isn't in a src subdirectory, but in the contrib directory directly. Debian, like most distros, produces several binary packages from a single

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread Craig Ringer
On 07/01/2011 02:20 AM, Dmitry Koterov wrote: The problem is that these INSERTs are rolled back oftenly (i.e. they are executed within a transaction block which is rolled back time to time), this is an existing design of the current architecture and unfortunately we have to live with it. And

Re: [GENERAL] Inheritence issue scheme advice?

2011-06-30 Thread Casey Havenor
Never-mind I'll just do it by hand. - Warmest regards, Casey Havenor -- View this message in context: http://postgresql.1045698.n5.nabble.com/Inheritence-issue-scheme-advice-tp4536626p4540532.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-ge

Re: [GENERAL] How to create "auto-increment" field WITHOUT a sequence object?

2011-06-30 Thread Chris Travers
Having done gapless numbering for some users of accounting software, there are two suggestions I would make. The first is that any sort of gapless numbering inherently runs into scalability. You HAVE to lock relevant records, and this means that only one insert can run at a time, and it must comm

Re: [GENERAL] Contrib source

2011-06-30 Thread gnuoytr
Yeah, I didn't realize that contrib source is in regular source download, nor did I notice that Synaptic was installing its own version of PG. The bulb wasn't lit. In all, I think I should have had two installs of PG; the one I built from source way back when (and stored out of standard locati