Re: [GENERAL] Sequence Not created with pg_dump

2009-08-05 Thread sweta
> > Seems unlikely (IOW, if so, you've found a bug no one else has ever > seen). Maybe they are being created implicitly by SERIAL column > declarations? > Yeah they are created by the Serial column . Regards Sweta -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Sequence Not created with pg_dump

2009-08-05 Thread John R Pierce
sw...@opspl.com wrote: Hello all, When I create a db dump using -- pg_dump -s dbname > mydump.sql Sequences present are not being added to the mydump.sql file you'll need to be a -little- more specific... sure seems to me like its working on this centos5 linux + pg 8.3.7 system [

Re: [GENERAL] Sequence Not created with pg_dump

2009-08-05 Thread Tom Lane
sw...@opspl.com writes: > When I create a db dump using -- > pg_dump -s dbname > mydump.sql > Sequences present are not being added to the mydump.sql file Seems unlikely (IOW, if so, you've found a bug no one else has ever seen). Maybe they are being created implicitly by SERIAL column dec

[GENERAL] Sequence Not created with pg_dump

2009-08-05 Thread sweta
Hello all, When I create a db dump using -- pg_dump -s dbname > mydump.sql Sequences present are not being added to the mydump.sql file PS Cannot paste the contents of the file . Its too large :P Regards Sweta -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] PREPARE query with IN?

2009-08-05 Thread Ivan Voras
Filip Rembiałkowski wrote: > fi...@filip=# prepare sth(int[]) as select * from ids where id = ANY($1); > PREPARE > > fi...@filip=# execute sth('{1,2,3}'); > id | t > +--- > 1 | eenie > 2 | menie > 3 | moe > (3 rows) Thanks! > 2009/8/6 Ivan Voras mailto:ivo...@freebsd.org>> > >

Re: [GENERAL] explicit JOIN faster than implicit?

2009-08-05 Thread Filip Rembiałkowski
Hi, 2009/8/6 Eric Schwarzenbach > I tried playing with the join_collapse_limit setting. The implicit join > query was unaffected. The explicit join out-performed the implicit one > by 50% when the join_collapse_limit was low enough, and took just as > long as the implicit one when the join_coll

Re: [GENERAL] explicit JOIN faster than implicit?

2009-08-05 Thread Tom Lane
Eric Schwarzenbach writes: > I'm in the process taking a large SELECT statement which had been > written using implicit join syntax (that is, just listing all the tables > in the FROM clause, and listing join conditions in the WHERE clause) and > rewriting it to use explicit JOIN syntax (they are

Re: [GENERAL] PREPARE query with IN?

2009-08-05 Thread Filip Rembiałkowski
fi...@filip=# prepare sth(int[]) as select * from ids where id = ANY($1); PREPARE fi...@filip=# execute sth('{1,2,3}'); id | t +--- 1 | eenie 2 | menie 3 | moe (3 rows) 2009/8/6 Ivan Voras > Is it possible to prepare a query with the IN clause in a meaningful > way? I could p

Re: [GENERAL] Make check fails on 8.3.7

2009-08-05 Thread Christine Desmuke
Tom Lane wrote: > Christine Desmuke writes: >> Tom Lane wrote: >>> Years ago I saw roughly similar symptoms when SELinux decided postgres >>> shouldn't be allowed to write to /dev/tty. > >> Thanks for the suggestion. It is not SELinux (SELinux status: disabled), but _something_ is preventing pos

[GENERAL] PREPARE query with IN?

2009-08-05 Thread Ivan Voras
Is it possible to prepare a query with the IN clause in a meaningful way? I could probably do it with a hard-coded number of arguments, like "SELECT x FROM t WHERE y IN ($1, $2, $3)" but that kind of misses the point of using IN for my needs. In any case, it would probably be a good idea to add a

Re: [GENERAL] explicit JOIN faster than implicit?

2009-08-05 Thread Eric Schwarzenbach
I tried playing with the join_collapse_limit setting. The implicit join query was unaffected. The explicit join out-performed the implicit one by 50% when the join_collapse_limit was low enough, and took just as long as the implicit one when the join_collapse_limit was high enough. If I'm reading

Re: [GENERAL] explicit JOIN faster than implicit?

2009-08-05 Thread Eric Schwarzenbach
Um, ok. You've listed some conditions in order of how well they should perform and these generally agree with my understanding. But how does this relate to the relative performance of the semantically equivalent explicit and implicit join syntaxes? Eric Martin Gainty wrote: > here is my best -> w

Re: [GENERAL] explicit JOIN faster than implicit?

2009-08-05 Thread Martin Gainty
here is my best -> worst join scenario starting with best 1)low cardinality tables 2)where or join on indexed columns 3)function indexes 4)concatenated indexes . 5)cartesian join ..every row join specifically joins every other row from every other table Martin Gainty ___

Re: [GENERAL] Does derby have an embedded Mode like Derby ?

2009-08-05 Thread Chris Browne
paul_t...@fastmail.fm (Paul Taylor) writes: > If instead you have to run a database standalone, then you do hit > configurations problems, not only platform specific issues but also > people bloody mindness about creating databases with different names > and database users : whatever the documentat

[GENERAL] explicit JOIN faster than implicit?

2009-08-05 Thread Eric Schwarzenbach
I'm in the process taking a large SELECT statement which had been written using implicit join syntax (that is, just listing all the tables in the FROM clause, and listing join conditions in the WHERE clause) and rewriting it to use explicit JOIN syntax (they are all inner joins). This has sped up t

Re: [GENERAL]

2009-08-05 Thread Chris Browne
sw...@opspl.com writes: >> You can use "kill " command to kill the slon daemons, >> find >> the pid's of the cluster and kill. >> >> > > But that is not totally right :P . If there is no other way we will > use it.. But I want to stop slony properly using slony command. :) There

Re: [GENERAL] Update Query doesn't affect all records

2009-08-05 Thread Leif B. Kristensen
On Wednesday 5. August 2009, Sam Mason wrote: >On Wed, Aug 05, 2009 at 11:27:52AM -0600, Scott Marlowe wrote: >> Otherwise we're blind men describing an elephant. > >Interesting analogy, not heard that one before! http://www.noogenesis.com/pineapple/blind_men_elephant.html -- Leif Biberg Kristens

Re: [GENERAL] Generating GRANT/REVOKE on functions from catalog

2009-08-05 Thread Tom Lane
Doug Gorley writes: > Perfect, I'm using the following function: > create or replace function fn_sig(p_oid oid) returns text > as $$ > begin > return p_oid::regprocedure; > end; > $$ language plpgsql; > In the following query: > select > pg_namespace.nspname || > '.' || > fn_sig(pg_p

Re: [GENERAL] Generating GRANT/REVOKE on functions from catalog

2009-08-05 Thread Doug Gorley
Perfect, I'm using the following function: create or replace function fn_sig(p_oid oid) returns text as $$ begin return p_oid::regprocedure; end; $$ language plpgsql; In the following query: select pg_namespace.nspname || '.' || fn_sig(pg_proc.oid) from pg_proc inner join pg_name

Re: [GENERAL] Update Query doesn't affect all records

2009-08-05 Thread Sam Mason
On Wed, Aug 05, 2009 at 11:27:52AM -0600, Scott Marlowe wrote: > On Wed, Aug 5, 2009 at 6:56 AM, Csaba Nagy wrote: > > On Wed, 2009-08-05 at 14:15 +0200, Schindler Andor wrote: > >> Can anyone tell me, how this is possible? If we insert 12 on the end, then > >> it decreases, but 11 remains the same

Re: [GENERAL] Update Query doesn't affect all records

2009-08-05 Thread Scott Marlowe
On Wed, Aug 5, 2009 at 6:56 AM, Csaba Nagy wrote: > Hi Andor, > > On Wed, 2009-08-05 at 14:15 +0200, Schindler Andor wrote: >> Can anyone tell me, how this is possible? If we insert 12 on the end, then >> it decreases, but 11 remains the same. The problem only occurs, when the >> where condition co

[GENERAL] LDAP using Active Directory

2009-08-05 Thread Michael Gould
I am wondering how others handle the login situation. We use Active Directory and require our users to change their passwords every 30 days. Currently in our old system using SQL Anywhere we use the integrated login feature. Our db server is Windows 2003 R2 I believe we can mimic this in Postg

Re: [GENERAL] Idle processes chewing up CPU?

2009-08-05 Thread Brendan Hill
Hi Craig, Sorry, I had the stack trace so I thought it was enough. I'll make sure the debug environment is set up and post the full stack traces again. -Brendan -Original Message- From: Craig Ringer [mailto:cr...@postnewspapers.com.au] Sent: Wednesday, 5 August 2009 4:35 PM To: Brendan

[GENERAL] PostGres Config to Authenticate against AD over LDAP

2009-08-05 Thread Richard Esmonde
Hi, I'm new to PostGres (so go easy on my naivety). I am trying to configure the postgres host based configuration file to permit users to authenticate against our Active Directory. Needless to say both Ubuntu server and AD are in the same Domain. . I am running PostGRESQL v8.3.7

Re: [GENERAL] Partition tables

2009-08-05 Thread Vick Khera
On Mon, Aug 3, 2009 at 10:51 AM, Michael Gould wrote: > The total size of our database with 5 years worth of data is about 3.4 gig. > In the business we are in, we open about 5-7 new locations each year and > close 2-3.  I was also thinking that if each partition was by location it > It seems to m

Re: [GENERAL] Does derby have an embedded Mode like Derby ?

2009-08-05 Thread Sam Mason
On Wed, Aug 05, 2009 at 02:45:20PM +0100, Paul Taylor wrote: > Ok, the original question was Postgres have an embedded mode. If it did > then everything could be contained with the application with no scripts > required AND no assumptions would be made about the database because the > same datab

Re: [GENERAL] Does derby have an embedded Mode like Derby ?

2009-08-05 Thread Paul Taylor
Sam Mason wrote: On Wed, Aug 05, 2009 at 08:02:13AM -0400, Bill Moran wrote: In response to Paul Taylor : this is an opensource project and to enable others to contribute easily it is much easier if they can download the code and run mvn package to compile and test. Once you start int

Re: [GENERAL] Does derby have an embedded Mode like Derby ?

2009-08-05 Thread Sam Mason
On Wed, Aug 05, 2009 at 08:02:13AM -0400, Bill Moran wrote: > In response to Paul Taylor : > > this > > is an opensource project and to enable others to contribute easily it is > > much easier if they can download the code and run mvn package to compile > > and test. Once you start introducing e

Re: [GENERAL] Update Query doesn't affect all records

2009-08-05 Thread Csaba Nagy
Hi Andor, On Wed, 2009-08-05 at 14:15 +0200, Schindler Andor wrote: > Can anyone tell me, how this is possible? If we insert 12 on the end, then > it decreases, but 11 remains the same. The problem only occurs, when the > where condition contains "sorrend > 9" or less. I bet the "sorrend" column

Re: [GENERAL] Update Query doesn't affect all records

2009-08-05 Thread Scott Marlowe
On Wed, Aug 5, 2009 at 6:15 AM, Schindler Andor wrote: > Hi! > > I've got this update query: > > http://pastebin.com/m2e29990 > > Can anyone tell me, how this is possible? If we insert 12 on the end, then > it decreases, but 11 remains the same. The problem only occurs, when the > where condition c

[GENERAL] Update Query doesn't affect all records

2009-08-05 Thread Schindler Andor
Hi! I've got this update query: http://pastebin.com/m2e29990 Can anyone tell me, how this is possible? If we insert 12 on the end, then it decreases, but 11 remains the same. The problem only occurs, when the where condition contains "sorrend > 9" or less. It occured using "PostgreSQL 8.3.3, c

Re: [GENERAL] Does derby have an embedded Mode like Derby ?

2009-08-05 Thread Bill Moran
In response to Paul Taylor : > Guy Rouillier wrote: > > Paul Taylor wrote: > >> I am testing the code that extracts information from a read only > >> database. These are UNIT tests so only interested in getting the > >> right results given a particular set of data, anything else is a > >> distr

Re: [GENERAL] A compare and/or sync. database structure?

2009-08-05 Thread Guillaume Lelarge
Le mercredi 5 août 2009 à 10:13:44, durumd...@gmail.com a écrit : > [...] > So please help me with your experience: what is the best solution, what is > the possible problem that make mistakes with this plan, and how to realize > it easily? > You can try check_postgres.pl Perl script. The same_sch

[GENERAL] A compare and/or sync. database structure?

2009-08-05 Thread durumd...@gmail.com
Hi! I wanna ask that which pg_dump command line needed if I want to compare two databases? I have many DBs, but all of them have two versions a development (local) DB and the online (web) DB. When I want to realize a new function, I develop it locally, and later I sync. it into online DB.

Re: [GENERAL] Idle processes chewing up CPU?

2009-08-05 Thread Craig Ringer
On Wed, 2009-08-05 at 16:44 +1000, Brendan Hill wrote: > Hi Craig, > > Sorry, I had the stack trace so I thought it was enough. I'll make sure the > debug environment is set up and post the full stack traces again. No worries. Sorry it cost you time. I've extended the wiki article on win32 debug