Re: [GENERAL] Can't reset password

2012-07-18 Thread Radosław Smogura
On Tue, 17 Jul 2012 22:42:22 -0400, Keith Chen wrote: Hello, I deleted my Postgresql and try to reinstall it. I try to reset the password by typing in net user postgres *. However, the new password doesn't work when the installer prompt me to input the password. Could you please help me? Than

Re: [GENERAL] Prepared statements performance

2012-05-10 Thread Radosław Smogura
On Thu, 10 May 2012 13:52:29 +0200, Alban Hertroys wrote: On 10 May 2012 11:30, Daniel McGreal wrote: I put the multi-value inserts in as I was curious as to why prepared statements would be slower given they only plan the query once (as also does the multi-value insert, I assume). That's a

Re: [GENERAL] Which Java persistence library would you use with PostgreSQL?

2012-05-02 Thread Radosław Smogura
large object. Hibernate actually supports both, but sometimes this may be little tricky, especially with auto generation. In such case hibernate specific annotations may help. Regards, Radosław Smogura Dnia środa, 2 maja 2012 12:15:35 Bata Degen pisze: > Hi list, > > what is your choice

Re: [GENERAL] Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues

2012-01-09 Thread Radosław Smogura
Dnia poniedziałek, 9 stycznia 2012 o 15:52:23 Alban Hertroys napisał(a): > On 9 January 2012 14:55, Radosław Smogura wrote: > > So responsible for this is database, but database doesn't have > > "real" BLOBs, this what is made in PG JDBC driver is just &qu

Re: [GENERAL] Vacuum and Large Objects

2012-01-09 Thread Radosław Smogura
On Fri, 06 Jan 2012 08:51:24 +0100, Guillaume Lelarge wrote: On Fri, 2012-01-06 at 07:12 +0100, Stefan Keller wrote: Hi Igor 2011/12/16 Igor Neyman wrote: > But I think, your problem is right here: > > " running VACUUM FULL pg_largeobject" > > If you are running "VACUUM FULL ..." on the tabl

Re: [GENERAL] Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues

2012-01-09 Thread Radosław Smogura
On Mon, 9 Jan 2012 00:40:08 +0100, Stefan Keller wrote: 2012/1/8 Radosław Smogura wrote: Not quite, PostgreSQL doesn't have LOB, nor OID type that is only reference> to LOB. In fact, BLOB behaviour in JDBC> is just thin wrapper for this what is missing in PostgreSQL - BLOBs. I c

Re: [GENERAL] Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues

2012-01-08 Thread Radosław Smogura
On Sun, 8 Jan 2012 21:57:37 +0100, Stefan Keller wrote: Thanks, Radosław, for the clarification. 2012/1/8 Radosław Smogura wrote: 3. pg_largeobjects is system table, hibernate do not creates it. 4. Trigger based approach is good for this, but You need to do this mannualy That's exact

Re: [GENERAL] Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues

2012-01-08 Thread Radosław Smogura
pe(type="org.hibernate.type.PrimitiveByteArrayBlobType") (I think you should remove @Lob too) on your field. Regards, Radosław Smogura -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] help... lost database after upgrade from 9.0 to 9.1

2012-01-05 Thread Radosław Smogura
On Wed, 4 Jan 2012 15:50:25 +0100, Bruno Boettcher wrote: Hello! just made a stupid move... upgraded a working system and without checking if the backup was ok so i end up with a debian system having upgraded to 9,1 without converting the database, and a scrambled backup which is totall

[GENERAL] Permission denied on relation

2011-12-16 Thread Radosław Smogura
Hi, I get following error from pgAdmin base/16547/29877 Permission denied on Windows, when opening database statistics. I almost sure how to reproduce this error, but it only works on one database. It's mix of following steps mainly in this order. In any way bug is not always sure, but chance

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-28 Thread Radosław Smogura
On Thu, 27 Oct 2011 12:43:00 -0700, John R Pierce wrote: On 10/27/11 11:39 AM, Brian Fehrle wrote: I've got a system that has 32 cores and 128 gigs of ram. We have connection pooling set up, with about 100 - 200 persistent connections open to the database. Our applications then use these conn

Re: [GENERAL] bytea columns and large values

2011-09-29 Thread Radosław Smogura
mains. I think it's about 1-2 week for making some infrastructure for this. Regards Radosław Smogura http://softperience.eu http://moderngres.eu - in near future -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] New feature: accumulative functions.

2011-09-25 Thread Radosław Smogura
tive" function is (weakly) increasing or decreasing f such that x < y => f(x) <= f(y) ? I only may deduce it for idea that search will be faster on index. Regards, Radosław Smogura http://softperience.eu/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

Re: [GENERAL] Alternative JDBC driver

2011-09-16 Thread Radosław Smogura
On Tue, 13 Sep 2011 10:18:46 +0200, Jimmy K. wrote: Hello, I asked this question on JDBC list, but it seems "dead". I found alternative JDBC driver marked as Beta 2 (actually last time bumped to Beta 2.1) http://softperience.eu/pages/cmn/ngpgjdbc.xhtml. We still test it. Those features are, mai

Re: [GENERAL] Bit datatype performance?

2011-09-14 Thread Radosław Smogura
bitmask, so I could use: ... where t.bits = :mymask directly, avoiding a full table scan. I assume this is possible (indexing bit and comparing bits), isn't it? Thanks, Antonio El 14/09/11 15:58, Radosław Smogura escribió: On Wed, 14 Sep 2011 12:00:35 +0200, Antonio Vieiro wrote: Hi al

Re: [GENERAL] Bit datatype performance?

2011-09-14 Thread Radosław Smogura
On Wed, 14 Sep 2011 12:00:35 +0200, Antonio Vieiro wrote: Hi all, One of my entities 'E' may be 'tagged' with an arbitrary set of 256 tags 'T'. A first approach could be to add a M:N relationship between 'E' and 'T'. A second way to do this could be to add a BIT(256) datatype to 'E', setti

Re: [GENERAL] SSL certificates issue

2011-09-07 Thread Radosław Smogura
Asia Wednesday 07 of September 2011 16:00:39 > > I personally haven't tired SSL for PostgreSQL but, I think, You should > > put in root.crt only intermediate certificate (C1 - from prev post), so > > all and only all "sub-certs" of intermediate CA will be able to > > establish connection (paranoic

Re: [GENERAL] SSL certificates issue

2011-09-07 Thread Radosław Smogura
On Wed, 07 Sep 2011 13:49:30 +0200, Asia wrote: I think problem is as follows, server sends to client certificates it can accept (as accepted parents), without intermediate CA, Java sees only top-level cert and tries to find client cert issued directly by top-level CA, I may only assume, that

Re: [GENERAL] SSL certificates issue

2011-09-07 Thread Radosław Smogura
On Wed, 07 Sep 2011 12:03:45 +0200, Asia wrote: Asia writes: > I would expect to have only one top-level CA cert in server's and client's root.crt and it was not possible to configure with 2-level intermediate CA. This seems a little confused, since in your previous message you stated that

Re: [GENERAL] Protocol question - fastpath & parameter status 'S'

2011-09-05 Thread Radosław Smogura
On Mon, 5 Sep 2011 10:54:21 -0400, John DeSoi wrote: On Sep 5, 2011, at 7:05 AM, Radosław Smogura wrote: Hello, During testing of (forked) driver we had seen following strange behaviour. JDBC driver mainly invokes Fastpath to obtain LOBs, because of unscientific privileges I get 1. Some

Re: [GENERAL] compression of query and result data in tcp socket connections

2011-09-05 Thread Radosław Smogura
ssion may be enabled. Regards, Radosław Smogura -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Protocol question - fastpath & parameter status 'S'

2011-09-05 Thread Radosław Smogura
out 'S'. I found this only one app server, but I don't think it makes some "background" async calls. Regards, Radosław Smogura -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] 100 times faster than mysql

2011-07-26 Thread Radosław Smogura
On Tue, 26 Jul 2011 17:02:12 +0300, Allan Kamau wrote: On Tue, Jul 26, 2011 at 4:41 PM, Merlin Moncure wrote: http://codesynthesis.com/~boris/blog/2011/07/26/odb-1-5-0-released/ merlin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] variant column type

2011-07-26 Thread Radosław Smogura
On Tue, 26 Jul 2011 10:45:27 -0700, John R Pierce wrote: in general, attribute-value sorts of lists are very difficult to use for relational operations and result in clumsy inefficient queries, as well as poor data integrity. whenever possible common attributes shoudl be stored properly as tab

Re: [GENERAL] Why do I have reading from the swap partition?

2011-07-22 Thread Radosław Smogura
On Fri, 22 Jul 2011 11:19:13 -0700 (PDT), Ioana Danes wrote: Hi Everyone, I am trying to debug a slowness that is happening on one of my production sites and I would like to ask you for some help. This is my environment: --- Dedicated server running: SUSE Linux Enterprise S

Re: [GENERAL] Weird problem that enormous locks

2011-07-15 Thread Radosław Smogura
On Fri, 15 Jul 2011 19:07:45 +0800, Tony Wang wrote: On Fri, Jul 15, 2011 at 18:50, Radosław Smogura wrote: On Fri, 15 Jul 2011 18:36:19 +0800, Tony Wang wrote: Weird that I receive your each message twice. On Fri, Jul 15, 2011 at 15:33, Radoslaw Smogura  wrote: Simple and obvious

Re: [GENERAL] Weird problem that enormous locks

2011-07-15 Thread Radosław Smogura
On Fri, 15 Jul 2011 18:36:19 +0800, Tony Wang wrote: Weird that I receive your each message twice. Once message You get from mailing list, one because You are (B)CC. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql

Re: [GENERAL] Weird problem that enormous locks

2011-07-15 Thread Radosław Smogura
[6] mailto:scott.marl...@gmail.com [7] mailto:rsmog...@softperience.eu Actually I don't know what pool You use (I think PHP - I don't know much about this), but I imagine following, If You don't use auto commit or commit: 1. User A updates moneys, gets connections C1, locks his r

Re: [GENERAL] Multi-tenancy in Postgres

2011-06-29 Thread Radosław Smogura
On Tue, 28 Jun 2011 17:04:54 -0600, Rob Sargent wrote: On 06/28/2011 04:52 PM, Greg Smith wrote: On 06/28/2011 05:45 PM, Rob Sargent wrote: I think Greg might be forgetting that some of us don't always get to choose what we work on. I was in a shop that decided to go with multi-tenancy for re

Re: [GENERAL] Error - could not get socket error status: Invalid argument

2011-06-22 Thread Radosław Smogura
On Wed, 22 Jun 2011 02:42:42 -0700 (PDT), simon wrote: how to fix it? -- View this message in context: http://postgresql.1045698.n5.nabble.com/Error-could-not-get-socket-error-status-Invalid-argument-tp1884036p4513496.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Re: [GENERAL] You could be a PostgreSQL Patch Reviewer!

2011-06-16 Thread Radosław Smogura
Craig Ringer Thursday 16 of June 2011 06:14:13 > On 16/06/11 04:49, Josh Berkus wrote: > > We especially need folks who are able to build PostgreSQL on Windows, as > > we have several Windows-specific patches and no reviewers for them. > > Urrrggh. Does that mean I have to volunteer myself? ;

Re: [GENERAL] Proposition fetch cursors

2011-06-14 Thread Radosław Smogura
On Tue, 14 Jun 2011 20:49:48 +0800, Craig Ringer wrote: On 06/14/2011 04:30 PM, Radosław Smogura wrote: Hello, I have proposition about one missing feature for cursors. Actually there is no support for fetching some data from cursor without moving it (in context of external applications

[GENERAL] Proposition fetch cursors

2011-06-14 Thread Radosław Smogura
Hello, I have proposition about one missing feature for cursors. Actually there is no support for fetching some data from cursor without moving it (in context of external applications). This could be nice if driver could fetch e.g. 100 rows, buffer it internally and then move cursor at desire

Re: [GENERAL] Best Practices - Securing an Enterprise application using JBOSS & Postgres

2011-06-09 Thread Radosław Smogura
Bill Moran Thursday 09 of June 2011 14:44:31 > In response to Craig Ringer : > > On 09/06/11 03:07, Isak Hansen wrote: > > > While MD5 is considered broken for certain applications, it's still > > > perfectly valid for auth purposes. > > > > MD5 rainbow tables can be calculated quickly using serv

Re: [GENERAL] what is the best way of storing text+image documents in postgresql

2011-06-09 Thread Radosław Smogura
On Wed, 8 Jun 2011 14:43:16 +0430, Arash pajoohande wrote: hello i have a lot of files in microsoft word format. each file consists of text and images (other text formatting like font is not important). i want to store this documents in Postgresql, and documents must display on web page when corr

Re: [GENERAL] Best Practices - Securing an Enterprise application using JBOSS & Postgres

2011-06-09 Thread Radosław Smogura
On Wed, 8 Jun 2011 21:07:12 +0200, Isak Hansen wrote: On Wed, Jun 8, 2011 at 11:43 AM, Radosław Smogura wrote: You should actually only consider safty of storing of such passwords in database. If with md5 the password isn't digested like in DIGEST HTTP auth, and only md5 shortc

Re: [GENERAL] Abnormal long SELECT query under postgresql 9.0.4

2011-06-08 Thread Radosław Smogura
Gaëtan Allart Wednesday 08 of June 2011 14:59:05 > Hi everyone, > > We've just moved our website database from pg 8.4 to pg 9.0 and we found > out a very long query (that wasn't that long under 8.4). > And I actually can't explain why it's taking so much timeŠ > > > > Here it is : > > EXPLAIN

Re: [GENERAL] Best Practices - Securing an Enterprise application using JBOSS & Postgres

2011-06-08 Thread Radosław Smogura
On Wed, 8 Jun 2011 10:18:23 +0300, eyal edri wrote: What settings would you recommend for using postgres in an enterprise application together with jboss? there are numerous auth options (from the documentation): 19.3.1. Trust authentication [1]19.3.2. Password authentication [2] 19.3.3. GSSAP

Re: [GENERAL] Postgres or Greenplum

2011-06-07 Thread Radosław Smogura
On Tue, 7 Jun 2011 23:04:04 +0100, Simon Riggs wrote: On Tue, Jun 7, 2011 at 10:26 PM, Simon Windsor wrote: I have been using Postgres for many years and have recently discover Greenplum, which appears to be a heavily modify Postgres based, multi node DB that is VERY fast. All the tests tha

Re: [GENERAL] using jboss with ident auth

2011-06-06 Thread Radosław Smogura
On Mon, 6 Jun 2011 11:55:47 +0200, Magnus Hagander wrote: On Jun 2, 2011 4:16 PM, "eyal edri" wrote: > > Hi, > > Im trying to use postgres with ident auth and jboss. > > heres my postgres files:  > > pg_hba.conf: > > # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD > > #

Re: [GENERAL] 10 missing features

2011-04-26 Thread Radosław Smogura
On Tue, 26 Apr 2011 14:30:19 +0200, Leif Biberg Kristensen wrote: On Monday 25 April 2011 10:41:36 Linos wrote: Hi all, only want to link this blog post http://blog.kimiensoftware.com/2011/04/top-10-missing-postgresql-features , i think he may have any good points. Miguel Angel. M

Re: [GENERAL] Howto sort the result of UNION (without modifying its type)?

2011-04-17 Thread Radosław Smogura
Clemens Eisserer Friday 08 April 2011 23:44:21 > Hi, > > I have a query where I UNION several select statements which return > IDs of type INTEGER. > > This works well, if the IDs don't need to be sorted: > > SELECT id FROM table WHERE id IN ((select id FROM table WHERE ...) UNION > > (SELECT id

Re: [GENERAL] Howto sort the result of UNION (without modifying its type)?

2011-04-17 Thread Radosław Smogura
Clemens Eisserer Friday 08 April 2011 23:44:21 > Hi, > > I have a query where I UNION several select statements which return > IDs of type INTEGER. > > This works well, if the IDs don't need to be sorted: > > SELECT id FROM table WHERE id IN ((select id FROM table WHERE ...) UNION > > (SELECT id

Re: [GENERAL] SSDs with Postgresql?

2011-04-14 Thread Radosław Smogura
On Thu, 14 Apr 2011 11:46:12 +0200, Henry C. wrote: On Thu, April 14, 2011 11:30, Leonardo Francalanci wrote: have a look at http://postgresql.1045698.n5.nabble.com/Intel-SSDs-that-may-not-suck-td426826 1.html It looks like those are "safe" to use with a db, and aren't that expensive. Th

[GENERAL] PostgreSQL trap, and assertion failed

2011-04-13 Thread Radosław Smogura
Hello, I have small crash reporting code, which I use during mmap-ing database. After last merge with master I got TRAP: FailedAssertion("!(slot > 0 && slot <= PMSignalState->num_child_flags)", File: "pmsignal.c", Line: 227) LOG: server process (PID 5128) was terminated by signal 6: Aborted L

Re: [GENERAL] Arrays of arrays

2011-04-07 Thread Radosław Smogura
Merlin Moncure Thursday 07 April 2011 15:53:00 > On Thu, Apr 7, 2011 at 4:39 AM, rsmogura wrote: > > Hello, > > > > May I ask if PostgreSQL supports arrays of arrays directly or indirectly, > > or if such support is planned? I'm interested about pseudo constructs > > like: 1. Directly - (integer

Re: [RMX:#] Re: [GENERAL] Strange loss of data during INSERT

2011-04-06 Thread Radosław Smogura
Hmm... Please attach your log with parameters passed to server, you said only about statement not about passwords. As well You provieded small number of information about your EE app (but it's starnge it works on Oracle). Is it EJB 3 or 2 app, and do you use EJB Entities or JPA ones? My suggest

Re: [GENERAL] Integrating New Data Type

2011-04-06 Thread Radosław Smogura
Pavel Stehule Tuesday 05 April 2011 10:11:02 > Hello > > 2011/4/5 Nick Raj : > > Hi all, > > I have defined a new data type. I have defined in and out function for > > that data type. > > But i want to know how to integrate this data type with postgres (how > > postgres compile my code or know my

Re: [GENERAL] ..horribly documented, inefficient, user-hostile, impossible to maintain interpreted language..

2011-04-04 Thread Radosław Smogura
John R Pierce Monday 04 April 2011 21:20:51 > On 04/04/11 12:07 PM, Martin Gainty wrote: > > ..horribly documented, inefficient, user-hostile, impossible to > > maintain interpreted language.. > > to whom might you be alluding to > > I only used a few of those adjectives, and prefixed them by > h

Re: [GENERAL] Need help for constructing query

2011-03-27 Thread Radosław Smogura
Marco Friday 25 March 2011 14:25:47 > Hi, > > I have a table like this: > > iddatemin max value > 1 2011-03-25 20 30 17 > 3 2011-03-21 40 55 43 > 3 2011-03-23 40 55 52 > 2 2011-02-25 5 2 > 4

Re: [GENERAL] Understanding Datum

2011-03-23 Thread Radosław Smogura
Nick Raj Wednesday 23 March 2011 18:45:41 > Hi, > I am understanding the postgres code. In code, i just want to see what are > values that are passing through the variables? > Can you please tell me if the variable is of type Datum, then how to print > its value? Because i dont the variable v type

Re: [GENERAL] PG COPY from version 8 to 9 issue with timezonetz

2011-03-17 Thread Radosław Smogura
Adrian Klaver Thursday 17 March 2011 19:18:25 > On Thursday, March 17, 2011 10:10:49 am Brent Gulanowski wrote: > > We use PG COPY to successfully in PG 8 to copy a database between two > > servers. Works perfectly. > > > > When the target server is PG 9, *some* fields of type timezonetz end up >

Re: [GENERAL] Questions about octal vs. hex for bytea

2011-02-20 Thread Radosław Smogura
"Reuven M. Lerner" Sunday 20 February 2011 12:31:09 > Hi, everyone. I've got a client who is planning to upgrade from > PostgreSQL 8.3 to 9.0 in the coming weeks. They use a lot of tables > with bytea columns. They're worried about the switch from octal to hex > formats for bytea data. > > >

Re: [GENERAL] Postgresql prepared transactions

2011-02-19 Thread Radosław Smogura
well. Radek, Radosław Smogura Saturday 19 February 2011 01:02:36 > Tom Lane Saturday 19 February 2011 00:48:00 > > > =?utf-8?q?Rados=C5=82aw_Smogura?= writes: > > > I do following commands > > > > > > test=# BEGIN; > > > BEGIN > > > tes

Re: [GENERAL] Postgresql prepared transactions

2011-02-18 Thread Radosław Smogura
Tom Lane Saturday 19 February 2011 00:48:00 > =?utf-8?q?Rados=C5=82aw_Smogura?= writes: > > I do following commands > > > > test=# BEGIN; > > BEGIN > > test=# insert into testxa1 values(1); > > INSERT 0 1 > > test=# insert dup; > > ERROR: syntax error at or near "dup" >

[GENERAL] Postgresql prepared transactions

2011-02-18 Thread Radosław Smogura
Hi, I do following commands test=# BEGIN; BEGIN test=# insert into testxa1 values(1); INSERT 0 1 test=# insert dup; ERROR: syntax error at or near "dup" LINE 1: insert dup; ^ test=# PREPARE TRANSACTION 'a'; ROLLBACK Why on prepare transaction I

Re: [GENERAL] find column name that has under score (_)

2011-02-17 Thread Radosław Smogura
akp geek Thursday 17 February 2011 19:55:46 > Hi all - > > I am trying to write a query to find all the column names in > database that has a underscore in it (_) example souce_id. I know like will > not work , if where column_name like '%_%' Can you please help? > > Regards Try SELECT

Re: [GENERAL] XML Encoding problem

2011-02-09 Thread Radosław Smogura
I may write some patch, actually text mode will not be affected, becuase it's text mode, and patch will fail if client encoding is "reacher" then server (one possiblity in this situation is to XML-encode to client encoding, text- rencode to server encoding) But looking at code same thing could o

Re: [GENERAL] Feature: vacuum page before write

2011-02-06 Thread Radosław Smogura
I prefer on demand solution, as it reduces latency and I can order vaccum at night, when I have free CPU resources. At least auto vaccum on flush should be configurable. Kind regards, Radek pasman pasmański Saturday 05 February 2011 04:29:37 > Hi. > I propose new feature. > Before flushing pag

Re: [GENERAL] PostgreSQL 9.0.3 - collate/ctype order by hu_HU.UTF8 is not correct sorting

2011-02-06 Thread Radosław Smogura
Adam PAPAI Sunday 06 February 2011 14:13:51 > Radosław Smogura wrote: > > You need to create database with LC_COLLATE="hu_HU.utf8", e.g. > > > > CREATE DATABASE tx2 ENCODING='UTF-8' TEMPLATE=template0 > > LC_COLLATE='pl_PL.utf8'; > &

Re: [GENERAL] PostgreSQL 9.0.3 - collate/ctype order by hu_HU.UTF8 is not correct sorting

2011-02-06 Thread Radosław Smogura
You need to create database with LC_COLLATE="hu_HU.utf8", e.g. CREATE DATABASE tx2 ENCODING='UTF-8' TEMPLATE=template0 LC_COLLATE='pl_PL.utf8'; Kind regards, Radosław Smogura http://www.softperience.eu Adam PAPAI Sunday 06 February 2011 11:02:25 > Adam PAP

Re: [GENERAL] Select for update with offset interferes with concurrent transactions

2011-02-01 Thread Radosław Smogura
Hmm... May I ask how this look in details. If e.g. I do select * from myeshop offset 100 limit 20, I have 1000 rows which rows will be locked? a) 0 to 120, or b) all rows will be locked.? Kind regards, Radek Tom Lane Tuesday 01 February 2011 18:18:17 > In 9.0, LIMIT/OFFSET processing is done

Re: [GENERAL] How to generate unique invoice numbers for each day

2011-01-16 Thread Radosław Smogura
I will sugest to: 1. Delete point 1. 2. In point 2. add FOR UPDATE 3. Use READ COMMITED TRANSACTION ISOLATION LEVEL Don't lock tables, You wrote you can generate invoices for few days backward, so you don't need locking whole table. Don't use seqences, as sequence value will don't get back when

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Radosław Smogura
Pooled id.. child machine connects to main and says give 1 of ids, main increments counter by 1, child allocates in given pool. On Wed, 5 Jan 2011 17:11:35 -0600, Michael Satterwhite wrote: Once multiple machines are linked to maintain the database, this has a flaw in it as a series i

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Radosław Smogura
Scott Ribe Wednesday 05 January 2011 17:33:51 > On Jan 5, 2011, at 9:19 AM, Leif Biberg Kristensen wrote: > > I can't help thinking of the «Birthday Paradox»: > Yes, the calculation of the probability of a collision is the same for the > "birthday paradox" as for random UUID collisions. Depends o

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Radosław Smogura
Sorry for not citation... When I was talking about "almost unique", I was meaning that the UUID is random so there is no guarantee that you will not generate two indencital UUIDs even in subsequent calls, but it has low probability (you have greater chances to win in LOTTO). 128bits is hug

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Radosław Smogura
On Wed, 05 Jan 2011 21:50:11 +1100, Craig Ringer wrote: On 01/05/2011 07:31 PM, Radosław Smogura wrote: * you have your id, before executing query, (in contrast to all this autoincrement) so you may put it in dependant rows Do you mean that with a UUID, you don't need to talk t

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Radosław Smogura
On Tue, 4 Jan 2011 11:07:00 -0800 (PST), Dennis Gearon wrote: I haven't been able to find anywhere, easily, in the documentation using google where a list of allowed data types for primary keys is. So, UUIDs can be primary keys? Any issues wtih them on sorting or paging of index tables, etc.?

Re: [GENERAL] Date Parameter To Query Confusing Optimizer

2011-01-04 Thread Radosław Smogura
Can You try "...BETWEEN ?::date and ?::date ..." syntax or send statement causing problems? Kind regards, Radosław Smogura On Tue, 04 Jan 2011 07:27:42 -0700, "Kurt Westerfeld" wrote: "By the very definition of a prepared statement the query plan gets stored before

Re: [GENERAL] Need advise for database structure for non linear data.

2011-01-03 Thread Radosław Smogura
join attr_val v on (v.def_id = d.id) join website w on (v.website_id = w.id) where d.name = '' and w.url='http://somtehing' This is common map structure. Kind regards, Radosław Smogura On Mon, 03 Jan 2011 12:26:45 +0100, Thomas Schmidt wrote: Hello, Am 03.01.11

Re: [GENERAL] Shit happens

2011-01-02 Thread Radosław Smogura
for vaccumed tuples. Kind regards, Radosław Smogura http://www.softperience.eu Alban Hertroys Sunday 02 January 2011 13:35:29 > On 2 Jan 2011, at 13:19, Dick Kniep wrote: > > Thanks for the clear answer. However, this is the simple answer that is > > also in the manual. Yes I kno

[GENERAL] Binary procedures for few types

2010-12-31 Thread Radosław Smogura
Hi, Can I ask for implementing binary in / out at least for following types: void - usefull when using binary and procudre returns void acl - in this way that role's/user's name will be visible in binary stream, so there will be no need to requerying for user's name by the oid. Kind regards, Ra

Re: [GENERAL] 2 versions of an entity worth distinct table?

2010-12-27 Thread Radosław Smogura
Hi, In this particular case it isn't worth to add separate table just for additional e-mail. gvim Monday 27 December 2010 02:47:29 > If a table representing contact details can have 2 but no more than 2 email > addresses is it really worth factoring-out email addresses to a separate > table.

Re: [GENERAL] Binary procedures for few types

2010-12-27 Thread Radosław Smogura
Merlin Moncure Monday 27 December 2010 15:30:27 > On Mon, Dec 27, 2010 at 4:00 AM, Radosław Smogura > > wrote: > > Hi, > > > > Can I ask for implementing binary in / out at least for following types: > > > > void - usefull when using binary and pro

[GENERAL] Binary procedures for few types

2010-12-27 Thread Radosław Smogura
Hi, Can I ask for implementing binary in / out at least for following types: void - usefull when using binary and procudre returns void acl - in this way that role's/user's name will be visible in binary stream, so there will be no need to requerying for user's name by the oid. Kind regards

Re: [GENERAL] Changing table owner to db owner.

2010-12-15 Thread Radosław Smogura
it to postgres console (Middle Button on Linux :)) Kind regards, Radosław Smogura http://www.softperience.eu Paul McGarry Wednesday 15 December 2010 02:02:56 > I have a number of DBs that are all the same structure but are owned > by different users and I want to add a table to each of tho

Re: [GENERAL] Changing table owner to db owner.

2010-12-15 Thread Radosław Smogura
. Paste it to postgres console (Middle Button on Linux :)) Kind regards, Radosław Smogura http://www.softperience.eu Paul McGarry Wednesday 15 December 2010 02:02:56 I have a number of DBs that are all the same structure but are owned by different users and I want to add a table to each of those

Re: [GENERAL] Problems Authenticating against OpenLDAP

2010-12-06 Thread Radosław Smogura
to 32? Does your open ldap has PostgreSQL backend? :) Try to increase open ldap log level - to get info about connection opening. -- -- Radosław Smogura http://www.softperience.eu David Kerr Monday 06 December 2010 18:00:19 > The problem is, i'm not seeing a corresponding error on

Re: [GENERAL] Full Text Partial Match at begining

2010-12-02 Thread Radosław Smogura
SQL : Expertise, Formation et Support I saw speed result of this and those are surprising. I saw source code, too. Can be this index used directly on text column? I mean if we will create this index for 100 characters long text it looks like the index will take 100^2=1, because it's s

Re: [GENERAL] How to recover a postgres installation from files

2010-12-02 Thread Radosław Smogura
ressed how simple is to delete something from Internet. I thought it will be simpler to find in internet any old soft. If something like this will happen with GCC? Remember to keep copy original DB files, to don't destroy it. -- -- Radosław Smogura http://www.softperience.eu On Thu,

Re: [GENERAL] The first dedicated PostgreSQL forum

2010-11-20 Thread Radosław Smogura
Hi, > As has been said previously, an unlinked forum (one which has no > interaction with the mailing list) is destined to fail, as others have > in the past. It's creates a fragmented community and poor support on > such a forum would reflect badly on the PostgreSQL community. > > Mailing lists

Re: [GENERAL] Considering Solid State Drives

2010-11-11 Thread Radosław Smogura
Hello, When choosing SSD drive you need to consider * number of writes to particular sector which is about 100k to 200k and then sector will fail * in case of DB grow, limitied size of those dirvers. > As part of datamining activity. I have some plpgsql functions > (executed in parallel, up to 6

Re: [GENERAL] JDBC Transactions

2010-11-02 Thread Radosław Smogura
filled out new membership and clicks save >> start transaction >> insert into memebership where id = 100; >> >> user1 >> pg's default transaction level is read commited (which I learned >> in "[GENERAL] Can Postgres Not Do This Safely ?!

Re: [GENERAL] Automated Database Backups

2010-10-17 Thread Radosław Smogura
databases. You can configure PSQL to use ident authentication, it should be configured as default, so user "postgres" have full access to all databases. Then assign home directory for this user, and create user specified cron file. Then you will don't need to store password. --

Re: [GENERAL] Application user name attribute on connection pool

2010-08-02 Thread Radosław Smogura
> how would you handle scale factors? numeric represents a BCD data > type, with a decimal fractional component. how would you represent, > say, 1.001 in your version? how would you add 1.001 to 1.01 > in your binary representation? I think about datastructure something like this [p