[GENERAL] Different cast behavior of TEXT and VARCHAR

2011-04-11 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, When PREPARing statements, the type guessing machinery seems to behave differently for VARCHAR and TEXT. Is this intentional? This is all against PostgreSQL 8.4.5 Illustration: | tomas@floh:~$ psql foo => psql (8.4.5) => Type "help" for hel

Re: [GENERAL] Why is 8.4 and 9.0 so much slower on some queries?

2011-04-11 Thread Uwe Schroeder
> Uwe Schroeder writes: > > I have a 8.3 database and decided for various reasons to upgrade to 8.4. > > I also tried 9.0 - same results. On the exactly same hardware with the > > exactly same configuration, some queries perform a factor of 10 > > slower on 8.4 and 9.0 than on 8.3 > > Hmm .

Re: [GENERAL] what data type to store fixed size integer?

2011-04-11 Thread Arash pajoohande
@Dave On Mon, Apr 11, 2011 at 9:18 PM, David Johnston wrote: > the data type does not need any arithmetic operations (as of > integers). > > > > You arguably do not have a number but simply a string that looks like a > number. Other examples are zip-codes and phone-numbers if you ignore >

Re: [GENERAL] Why is 8.4 and 9.0 so much slower on some queries?

2011-04-11 Thread Tom Lane
Uwe Schroeder writes: > I have a 8.3 database and decided for various reasons to upgrade to 8.4. I > also tried 9.0 - same results. > On the exactly same hardware with the exactly same configuration, some > queries perform a factor of 10 slower on 8.4 and 9.0 than on 8.3 Hmm ... the problem

[GENERAL] Why is 8.4 and 9.0 so much slower on some queries?

2011-04-11 Thread Uwe Schroeder
Hello everyone, this is very odd, particularly because there's obviously nobody having these issues when I google for it. I have a 8.3 database and decided for various reasons to upgrade to 8.4. I also tried 9.0 - same results. On the exactly same hardware with the exactly same configuration,

[GENERAL] Column storage (EXTERNAL/EXTENDED) settings for bytea/text column

2011-04-11 Thread Joel Stevenson
Hi all, I'm trying to do some comparisons between the EXTERNAL and the EXTENDED storage methods on a bytea column and from the outside the setting doesn't appear to affect the value stored on initial insert, but perhaps I'm looking at the wrong numbers. If I create two new tables with a single

Re: [GENERAL] CREATE RULE _copy AS ON COPY TO ...

2011-04-11 Thread Vibhor Kumar
On Apr 11, 2011, at 11:56 PM, Willy-Bas Loos wrote: > My ON INSERT rule won't go off when I copy into it. > Is there a way to COPY into a RULE? COPY Command does not respect rule on table, so please use trigger. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL C

Re: [GENERAL] Howto use "COPY FROM" with the native API?

2011-04-11 Thread Pavel Stehule
Hello 2011/4/11 Clemens Eisserer : > Hi, > > We are working on an university project for network traffic accounting. > We use ulogd-2 to log netfilter packets, however it creates for each > packet a seperate transaction and also doesn't use prepared > statements, which results in horrible performa

Re: [GENERAL] Howto use "COPY FROM" with the native API?

2011-04-11 Thread Andy Chambers
On Mon, 11 Apr 2011 11:21:16 -0400, Clemens Eisserer wrote: Hi, We are working on an university project for network traffic accounting. We use ulogd-2 to log netfilter packets, however it creates for each packet a seperate transaction and also doesn't use prepared statements, which results i

[GENERAL] CREATE RULE _copy AS ON COPY TO ...

2011-04-11 Thread Willy-Bas Loos
Hi, My ON INSERT rule won't go off when I copy into it. Is there a way to COPY into a RULE? I'm using 8.4 now. Also interested in 9. Cheers, WBL -- "Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw

[GENERAL] PG 9.0 32 bits bin under 64 bit arq

2011-04-11 Thread manuel antonio ochoa
Could I install pg 9.0 binary 32 bits in SO of 64 bits ? with suse 11.3 thnks

[GENERAL] Howto use "COPY FROM" with the native API?

2011-04-11 Thread Clemens Eisserer
Hi, We are working on an university project for network traffic accounting. We use ulogd-2 to log netfilter packets, however it creates for each packet a seperate transaction and also doesn't use prepared statements, which results in horrible performance. What we are looking for is a low-overhead

Re: [GENERAL] autovacuum issue after upgrade to 9.0.1

2011-04-11 Thread George Woodring
We are still seeing the spike in vacuums every 8 days, even after upgrading to 9.0.3. Any suggestions on how to spread them out? Thanks, George Woodring > > On Wed, Mar 16, 2011 at 7:12 PM, Aleksey Tsalolikhin < > atsaloli.t...@gmail.com> wrote: > > Do you see this issue on 9.0.3, the current

Re: [GENERAL] what data type to store fixed size integer?

2011-04-11 Thread David Johnston
the data type does not need any arithmetic operations (as of integers). You arguably do not have a number but simply a string that looks like a number. Other examples are zip-codes and phone-numbers if you ignore symbols. Thus you should probably use an appropriately sized char/varchar.

Re: [GENERAL] Global Variables in plpgsql

2011-04-11 Thread Dmitriy Igrishin
Hey Nick, 2011/4/11 Nick Raj > Hi, > Can anyone know how to define global variable in plpgsql? > Thanks > Why if you are already inside a database system ? :-) Just use tables. > > Regards, > Raj > > -- // Dmitriy.

Re: [GENERAL] Count for pagination

2011-04-11 Thread Michael C Rosenstein
Any suggestions on how to get the count of all records that could be returned We use a window function to get the total # of records within each of our paginated queries: SELECT ... ,COUNT(*) OVER() fullRowCount FROM ... WHERE ... ORDER BY ... LIMIT ... OFFSET ...; While there is a cost

Re: [GENERAL] Global Variables in plpgsql

2011-04-11 Thread Adrian Klaver
On 04/11/2011 03:53 AM, Nick Raj wrote: Hi, Can anyone know how to define global variable in plpgsql? Thanks Global to what? Regards, Raj -- Adrian Klaver adrian.kla...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] Global Variables in plpgsql

2011-04-11 Thread Nick Raj
Hi, Can anyone know how to define global variable in plpgsql? Thanks Regards, Raj