Re: [GENERAL] c program fails to run with the postgres which is installed at user location

2010-06-02 Thread John R Pierce
zhong ming wu wrote: ... This machine is RHEL 5.5 and has both RH stock postgres 8.1.18 in standard location as well as pg 8.4.4 which is in my home folder. The libraries are libpg.so.4 and libpg.so.5 respectively for two versions. I just lifted one of the examples from postgres documentation

[GENERAL] Attempting to get kerberos authentication working

2010-06-02 Thread Bryan Montgomery
Hello, I'm trying to get kerberos working with postgres 8.4 on openSUSE authenticating against AD. I have the server configured and can do a kinit against my account on the server. I have a keytab file produced by the administrators. $ klist -kt poe3b.keytab Keytab name: FILE:bob.keytab KVNO Times

[GENERAL] c program fails to run with the postgres which is installed at user location

2010-06-02 Thread zhong ming wu
I am trying to compile and run c program which reads the journal of an ancient propriety database and copy these transactions over to postgres. The process I follow is by trial and error and made worse by the fact that I haven't before made c program which talks to postgres and because I have to u

Re: [GENERAL] Autovacuum Daemon is Turned On by Default in Postgres 8.3.8?

2010-06-02 Thread Scott Marlowe
On Wed, Jun 2, 2010 at 6:40 PM, Wang, Mary Y wrote: > Hi, > > I'm looking at my log file (see my log file below) and it seems like the > autovacuum daemon is turned on by default in Postgres 8.3.8.  Does that mean > that I no longer need to manually invoke the autovacuum command anymore?  I > u

Re: [GENERAL] Autovacuum Daemon is Turned On by Default in Postgres 8.3.8?

2010-06-02 Thread Adrian Klaver
On Wednesday 02 June 2010 6:17:28 pm Wang, Mary Y wrote: > I used to execute the VACCUM and ANALYZE commands manually in a Postgres > 7.x.x version. So my question was that I assume that I no longer have to > perform those two commands manually anymore. I just wanted to be sure. > Mary > You don'

Re: [GENERAL] Autovacuum Daemon is Turned On by Default in Postgres 8.3.8?

2010-06-02 Thread Wang, Mary Y
I used to execute the VACCUM and ANALYZE commands manually in a Postgres 7.x.x version. So my question was that I assume that I no longer have to perform those two commands manually anymore. I just wanted to be sure. Mary -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gm

Re: [GENERAL] Autovacuum Daemon is Turned On by Default in Postgres 8.3.8?

2010-06-02 Thread Adrian Klaver
On Wednesday 02 June 2010 5:40:58 pm Wang, Mary Y wrote: > Hi, > > I'm looking at my log file (see my log file below) and it seems like the > autovacuum daemon is turned on by default in Postgres 8.3.8. Does that > mean that I no longer need to manually invoke the autovacuum command > anymore? I

[GENERAL] Autovacuum Daemon is Turned On by Default in Postgres 8.3.8?

2010-06-02 Thread Wang, Mary Y
Hi, I'm looking at my log file (see my log file below) and it seems like the autovacuum daemon is turned on by default in Postgres 8.3.8. Does that mean that I no longer need to manually invoke the autovacuum command anymore? I used to do it manually in an older version of Postgres. tail pos

Re: [GENERAL] How do we get the Client-Time and Server-Time from psql ?

2010-06-02 Thread Steve Crawford
On 06/02/2010 03:29 PM, raghavendra t wrote: ... Suppose am at the server-end, how could i get the client-time. Its really troublesome when compared with the timezone column in a table. Not sure what you are getting at. You are always connected to the server _through_ a client and you _tell_

Re: [GENERAL] Don't' Understand the Processes Listing Associated with Postgres

2010-06-02 Thread John R Pierce
Wang, Mary Y wrote: Hi, I'm looking at all the processes from 'ps' that are related to Postgres. How come there is a process associated with a different date? Are those processes to be expected? Should I be concerned? I'm running on Postgres 8.3.8. The database is working and running.

[GENERAL] Don't' Understand the Processes Listing Associated with Postgres

2010-06-02 Thread Wang, Mary Y
Hi, I'm looking at all the processes from 'ps' that are related to Postgres. How come there is a process associated with a different date? Are those processes to be expected? Should I be concerned? I'm running on Postgres 8.3.8. The database is working and running. Here is the list: 1 S

Re: [GENERAL] Commit every N rows in PL/pgsql

2010-06-02 Thread Chris Browne
Chris Browne writes: > len.wal...@gmail.com (Len Walter) writes: >> I need to populate a new column in a Postgres 8.3 table. The SQL would be >> something like "update t set col_c = col_a + >> col_b". Unfortunately, this table has 110 million rows, so running that >> query runs out of memory. >

Re: [GENERAL] Commit every N rows in PL/pgsql

2010-06-02 Thread Chris Browne
len.wal...@gmail.com (Len Walter) writes: > I need to populate a new column in a Postgres 8.3 table. The SQL would be > something like "update t set col_c = col_a + > col_b". Unfortunately, this table has 110 million rows, so running that query > runs out of memory. Unnecessary. On Oracle, the

Re: [GENERAL] How do we get the Client-Time and Server-Time from psql ?

2010-06-02 Thread raghavendra t
Hi All, Thank you for the update. Suppose am at the server-end, how could i get the client-time. Its really troublesome when compared with the timezone column in a table. Regards Raghavendra On Wed, Jun 2, 2010 at 11:37 PM, Steve Crawford < scrawf...@pinpointresearch.com> wrote: > On 06/02/201

Re: [GENERAL] [Fwd: Put me on your white list]

2010-06-02 Thread u235sentinel
ROFL!! That's funny... We're spam but he requested and validated the email address to receive the list emails. On 06/02/2010 03:37 PM, John R Pierce wrote: hmmm. the listadmin may wanna poke this guy for using lame whitelisting. sadly, the headers give no clue who the recipient was, oth

[GENERAL] [Fwd: Put me on your white list]

2010-06-02 Thread John R Pierce
hmmm. the listadmin may wanna poke this guy for using lame whitelisting. sadly, the headers give no clue who the recipient was, other than th domain pricom.com.au Original Message From - Wed Jun 02 14:34:16 2010

Re: [GENERAL] Exception while accessing database

2010-06-02 Thread John R Pierce
Manohar Bhattarai wrote: Hi, This problem was initially asked to pgsql-j...@postgresql.org and I was suggested to ask this problem here. So my initial problem was that i was not able to set the Driver for postgresql. I solved that problem with the help there.

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Tim Landscheidt
Stephen Frost wrote: >> > Just thinking about it now; do SQL's semantics say it'll always do >> > the right thing? PG does in a couple of quick tests (i.e. one where >> > customer is a small table and PG prefers a seqscan and where it's larger >> > and prefers an index scan) but I'm not sure if

Re: [GENERAL] What Linux edition we should chose?

2010-06-02 Thread Mathieu De Zutter
On Wed, Jun 2, 2010 at 7:44 PM, Adrian von Bidder wrote: > On Monday 31 May 2010 10.29:22 Michal Szymanski wrote: >> for Debian sometimes we had to wait many weeks for >> official packages. > > Experiemntal packages can be installed directly into Debian unstable (sid) > installations and can often

Re: [GENERAL] [ADMIN] Exception while accessing database

2010-06-02 Thread Kevin Grittner
Manohar Bhattarai wrote: > FATAL: password authentication failed for user "postgres" > But the password is the same that i use to login postgres user in > the terminal. > What could be the problem? When you say "postgres user in the terminal", do you mean logging in to the operating system?

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-02 Thread Alvaro Herrera
Excerpts from Gareth.Williams's message of mar jun 01 02:44:35 -0400 2010: > Hi, > > We want to reindex the database behind a production service without > interrupting the service. > > I had an idea for creating the index with a new name then dropping the > existing index and renaming the new o

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread Peter Geoghegan
> It's good to have actual working code in production to bolster the > case that the design is sound. > > How much work would it be to refactor libgeos_c to use a catch-all > exception handler? > Well, they'd have to be using specific exception handlers to get the error message. Perhaps they just

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread Peter Geoghegan
Hi Mark. You'll recall that I talked with you for quite a while at Pg-day 2009 in Paris. Nice of you to chime in here. > Except that Pg, via palloc, offers a way to clean up a whole memory context. > Ensuring you delete your C++ object graph (probably via a few opaque > pointers you pass around i

Re: [GENERAL] [NOVICE] sum multiple tables gives wrong answer?

2010-06-02 Thread Michael Diener
I just want to say thanks to all the great responses it is now working like a charm!! I knew I was missing some tid bit of DB SQL knowledge. Thanks again! Cheers michael -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of

Re: [GENERAL] postgres authentication against Windows Domain

2010-06-02 Thread Stephen Frost
* u235sentinel (u235senti...@gmail.com) wrote: > We would have to rebuild the binaries and we're already heavily using > the database. I could rebuild it again but it's like the fourth time > I've been asked to add a feature. I did read that GSSAPI was the way to > go but I'm being told to

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread Bruce Momjian
Peter Geoghegan wrote: > >> I would have > >> imagined that ultimately, the call to the Pg C function must return, > >> and therefore cannot affect stack unwinding within the C++ part of the > >> program. > > > > That's the whole point; a longjmp breaks the call chain, and the > > guarantee that ev

[GENERAL] Exception while accessing database

2010-06-02 Thread Manohar Bhattarai
Hi, This problem was initially asked to pgsql-j...@postgresql.org and I was suggested to ask this problem here. So my initial problem was that i was not able to set the Driver for postgresql. I solved that problem with the help there. But I have a new exception and it is : org.postgresql.util.PSQL

Re: [GENERAL] How do we get the Client-Time and Server-Time from psql ?

2010-06-02 Thread Steve Crawford
On 06/02/2010 02:48 AM, raghavendra t wrote: Hi All, How do i get the client time and server time. I am connecting remotely. If i give SELECT CURRENT_TIME;,it shows the server time. How do we get the client time ? Time is the same everywhere but displayed in different ways according to loca

Re: [GENERAL] What Linux edition we should chose?

2010-06-02 Thread Chris Browne
Michal Szymanski writes: > Hi, > Currently we use Debian, but it chosen by our OS admnistrator. Now we > can change our OS and it is question what Linux edition will be the > best. We would like have access to new versions of Postgres as soon > as possible, for Debian sometimes we had to wait man

Re: [GENERAL] postgres authentication against Windows Domain

2010-06-02 Thread u235sentinel
On 06/02/2010 08:05 AM, Stephen Frost wrote: * Joshua Tolley (eggyk...@gmail.com) wrote: On Tue, Jun 01, 2010 at 11:56:19AM -0600, u235sentinel wrote: I'm still trying to figure out why you wouldn't want to use GSSAPI.. It's a heck of alot better than using LDAP wrt security..

Re: [GENERAL] What Linux edition we should chose?

2010-06-02 Thread Adrian von Bidder
On Monday 31 May 2010 10.29:22 Michal Szymanski wrote: > for Debian sometimes we had to wait many weeks for > official packages. FWIW: I've just noticed that Debian experimental carries pg 9.0beta1, it was uploaded 3.5., so thats not bad, taking into account that it was released only a few days

Re: [GENERAL] How do we get the Client-Time and Server-Time from psql ?

2010-06-02 Thread Adrian von Bidder
On Wednesday 02 June 2010 13.46:47 Stephen Frost wrote: > * raghavendra t (raagavendra@gmail.com) wrote: > > How do i get the client time and server time. I am connecting remotely. > > If i give SELECT CURRENT_TIME;,it shows the server time. How do we get > > the client time ? > > uh, \! date

Re: [GENERAL] libreadline and Debian 5 - not missing just badly named

2010-06-02 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > "J. Bagg" writes: > > I've just had the common problem with not finding the readline library > > while compiling/linking 8.4.4 on a new linux (Debian 5 - lenny). Nothing > > seemed to work: --with-libraries=/lib and pointing CFLAGs there all > > failed t

Re: [GENERAL] sum multiple tables gives wrong answer?

2010-06-02 Thread Stephen Frost
* Michael Diener (m.die...@gomogi.com) wrote: > I have an SQL problem that I thought was easy to do but gives me always the > wrong answer. I think it's the right answer- the problem is that you're asking SQL a different question than what you want the answer to. > 2 Tables with a column called "

Re: [GENERAL] PosttgreSQL on AIX

2010-06-02 Thread Merlin Moncure
On Wed, Jun 2, 2010 at 10:53 AM, Ernesto Quiñones wrote: > It's possible runs pgPool-II on AIX?? > It looks like it does. merlin -- 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] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Stephen Frost
* Tim Landscheidt (t...@tim-landscheidt.de) wrote: > > Just thinking about it now; do SQL's semantics say it'll always do > > the right thing? PG does in a couple of quick tests (i.e. one where > > customer is a small table and PG prefers a seqscan and where it's larger > > and prefers an index sc

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread David Fetter
On Wed, Jun 02, 2010 at 05:41:10PM +0100, Mark Cave-Ayland wrote: > David Fetter wrote: > > >Is PostGIS following these guidelines? > > In short, no. Due to various problems in the early days with C++ > exceptions generated by the GEOS library causing problems in C (and > also ABI changes forcing

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-02 Thread Greg Smith
gareth.willi...@csiro.au wrote: I'm concerned that just because I *can* create duplicate indexes, it doesn't mean I *should*. I'm worried it might actually break the service worse than the locking that I'm trying to avoid. Does anyone know which index will be used if there are duplicate ones

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread Mark Cave-Ayland
David Fetter wrote: Is PostGIS following these guidelines? In short, no. Due to various problems in the early days with C++ exceptions generated by the GEOS library causing problems in C (and also ABI changes forcing a recompile of any GEOS linked library), a thin intermediate C++ layer cal

Re: [GENERAL] libreadline and Debian 5 - not missing just badly named

2010-06-02 Thread Tom Lane
"J. Bagg" writes: > I've just had the common problem with not finding the readline library > while compiling/linking 8.4.4 on a new linux (Debian 5 - lenny). Nothing > seemed to work: --with-libraries=/lib and pointing CFLAGs there all > failed to find readline. The installed packages though sa

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread Craig Ringer
On 2/06/2010 11:49 PM, Peter Geoghegan wrote: On 2 June 2010 13:36, Craig Ringer wrote: Really? That seems like an *incredibly* arduous requirement. Intuitively, I find it difficult to believe. After all, even though using longjmp in C++ code is a fast track to undefined behaviour, I would hav

[GENERAL] libreadline and Debian 5 - not missing just badly named

2010-06-02 Thread J. Bagg
I've just had the common problem with not finding the readline library while compiling/linking 8.4.4 on a new linux (Debian 5 - lenny). Nothing seemed to work: --with-libraries=/lib and pointing CFLAGs there all failed to find readline. The installed packages though said that it was present.

Re: [GENERAL] Detecting if the DB is in backup mode or not

2010-06-02 Thread Thom Brown
On 2 June 2010 16:28, wrote: > Hello, > > > > I am running pg 8.3, and I’m working on some scripts to take online backups > of the database with backup mode and netapp snapshots.  I can successfully > run the pg_start_backup/pg_stop_backup functions, but how to I query to see > what mode the DB c

Re: [GENERAL] [NOVICE] sum multiple tables gives wrong answer?

2010-06-02 Thread Oliveiros
Howdy, Michael. Your query is failing because you are doing the cartesian product of the tables with that query Can't you do it on two different queries? Say select sum(flaeche)/1 as "greens HA" from green; and then select sum(flaeche)/1 as "fairway HA" from fairway; ? Do you reall

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread Peter Geoghegan
On 2 June 2010 13:36, Craig Ringer wrote: >> >> Really? That seems like an *incredibly* arduous requirement. >> Intuitively, I find it difficult to believe. After all, even though >> using longjmp in C++ code is a fast track to undefined behaviour, I >> would have imagined that doing so in an isol

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Tim Landscheidt
Sam Mason wrote: >> > SELECT c.* >> > FROM customer c, ( >> > SELECT *, row_number() OVER () >> > FROM (VALUES (23), (56), (2), (12), (10)) x) x(val,ord) >> > WHERE c.id = x.val >> > ORDER BY x.ord; >> Wow, that's really cool and a nice case for row_number(). > Just thinking abo

Re: [GENERAL] [NOVICE] sum multiple tables gives wrong answer?

2010-06-02 Thread Richard Broersma
On Wed, Jun 2, 2010 at 7:23 AM, Michael Diener wrote: > select  sum(flaeche)/1 as "greens HA"  from green; > result: > Wrong Answer with this query > > select >  sum(green.flaeche)/1 as "greens HA", >  sum (fairway.flaeche)/1 as "fairway HA" >   from green, fairway; It isn't easy t

[GENERAL] Detecting if the DB is in backup mode or not

2010-06-02 Thread Adam_Crews
Hello, I am running pg 8.3, and I'm working on some scripts to take online backups of the database with backup mode and netapp snapshots. I can successfully run the pg_start_backup/pg_stop_backup functions, but how to I query to see what mode the DB currently is in? If my script fails to run

Re: [GENERAL] [NOVICE] sum multiple tables gives wrong answer?

2010-06-02 Thread Thom Brown
On 2 June 2010 15:23, Michael Diener wrote: > Hi, > > > > I’m new to the list and have the following situation happening "PostgreSQL > 8.4.1, compiled by Visual C++ build 1400, 32-bit" running windows XP sp3 > > > > I have an SQL problem that I thought was easy to do but gives me always the > wron

Re: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-06-02 Thread Tom Wilcox
So for a system which was being used to serve many clients it would be fine (web service, etc). But for my purposes where I am using a single session to process large tables of data, (such as a mammoth update statement normalising and encoding 25million rows of string data) the 32-bit version i

[GENERAL] sum multiple tables gives wrong answer?

2010-06-02 Thread Michael Diener
Hi, I'm new to the list and have the following situation happening "PostgreSQL 8.4.1, compiled by Visual C++ build 1400, 32-bit" running windows XP sp3 I have an SQL problem that I thought was easy to do but gives me always the wrong answer. 2 Tables with a column called "flaeche" "doub

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread David Fetter
On Wed, Jun 02, 2010 at 11:06:06AM -0400, m. hvostinski wrote: > Thanks to all for the feedback. I keep getting impressed by how > flexible PostgreSQL is. > > Any ideas which query should perform better? I put together all the > suggested approaches below. Testing beats theorizing any day. The

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Yeb Havinga
m. hvostinski wrote: Thanks to all for the feedback. I keep getting impressed by how flexible PostgreSQL is. Any ideas which query should perform better? I put together all the suggested approaches below. EXPLAIN ANALYZE of these queries in psql should give hard numbers. My bet is on approach

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread m. hvostinski
Thanks to all for the feedback. I keep getting impressed by how flexible PostgreSQL is. Any ideas which query should perform better? I put together all the suggested approaches below. == Approach 1 == SELECT c.* FROM customer c, (VALUES (1,23), (2,56), (3, 2), (4,12), (5,10)) x(or

Re: [GENERAL] replanning prepared Statements

2010-06-02 Thread Andreas Kretschmer
Janning wrote: > Hi, > > I am using prepared statements in Postgresql 8.4. > > Does Postgresql > > a) plans statements only once when PREPARE is called? > > b) replans statements from time to time > > c) replans when underlying statistics change on behalf of ANALYZE command? AFAIK a), see

Re: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-06-02 Thread Magnus Hagander
It does when you have many sessions. But each individual session can only use "32 bits worth of memory", and shaared memory counts in all processes. The memory can be used for *os level cache*, not postgresql buffercache. //Magnus On Wed, Jun 2, 2010 at 16:08, Tom Wilcox wrote: > Hi Stephen, > >

Re: [GENERAL] What Linux edition we should chose?

2010-06-02 Thread Vick Khera
2010/5/31 Devrim Gündüz : > On Mon, 2010-05-31 at 21:14 +0530, Nilesh Govindarajan wrote: >> if you install some libraries like python clients or some >> software depending on PgSql from the repositories in RPM/DPKG based >> OS, you will have a tough time with the dependency stuff. > > Really? > M

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Sam Mason
On Wed, Jun 02, 2010 at 04:47:01PM +0200, A. Kretschmer wrote: > In response to Sam Mason : > > SELECT c.* > > FROM customer c, ( > > SELECT *, row_number() OVER () > > FROM (VALUES (23), (56), (2), (12), (10)) x) x(val,ord) > > WHERE c.id = x.val > > ORDER BY x.ord; > > Wow, that'

Re: [GENERAL] PosttgreSQL on AIX

2010-06-02 Thread Ernesto Quiñones
It's possible runs pgPool-II on AIX?? thanks 2010/6/2 Merlin Moncure : > On Tue, Jun 1, 2010 at 8:39 PM, Ernesto Quiñones wrote: >> How  many concurrence can support a server with 4 PPC Power 6 and 16GB >> RAM??!! >> >> I was thinking install the load balancing in this machine but maybe I >> co

[GENERAL] replanning prepared Statements

2010-06-02 Thread Janning
Hi, I am using prepared statements in Postgresql 8.4. Does Postgresql a) plans statements only once when PREPARE is called? b) replans statements from time to time c) replans when underlying statistics change on behalf of ANALYZE command? kind regards Janning -- http://www.kicktipp.de

Re: Fwd: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-06-02 Thread Tom Wilcox
Stephen, You're a legend! That is exactly the answer I needed to hear from someone who actually knows the score. I am now powering on with Plan B: Postgres64 on Linux64. After relentless searching I have become fairly convinced that a stable release of 64-bit postgres for Windows doesn't exist ye

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread A. Kretschmer
In response to Sam Mason : > Isn't this fun; here's another version using window functions (from PG > 8.4 onwards) this time: > > SELECT c.* > FROM customer c, ( > SELECT *, row_number() OVER () > FROM (VALUES (23), (56), (2), (12), (10)) x) x(val,ord) > WHERE c.id = x.val > ORDER

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread David Fetter
On Wed, Jun 02, 2010 at 03:33:16PM +0100, Sam Mason wrote: > On Wed, Jun 02, 2010 at 06:28:14AM -0700, David Fetter wrote: > > On Tue, Jun 01, 2010 at 06:16:06PM -0400, m. hvostinski wrote: > > > I have a simple query like: > > > > > > SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10) > > >

Re: [GENERAL] Statement Pooling

2010-06-02 Thread Tom Lane
Janning writes: > But I remember a post of tom lane who said that prepared statements get > replaned since 8.4 if underlying statistics change. Since 8.3, IIRC. 8.4 extended the mechanism to apply in some more cases, but an ANALYZE should cause a replan in 8.3. regards,

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Sam Mason
On Wed, Jun 02, 2010 at 06:28:14AM -0700, David Fetter wrote: > On Tue, Jun 01, 2010 at 06:16:06PM -0400, m. hvostinski wrote: > > I have a simple query like: > > > > SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10) > > > > The problem is that I need to retrieve the rows in the same order a

Re: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-06-02 Thread Tom Wilcox
Hi Stephen, The impression I was getting from Magnus Hagander's blog was that a 32-bit version of Postgres could make use of >4Gb RAM when running on 64-bit Windows due to the way PG passes on the responsibility for caching onto the OS.. Is this definitely not the case then? Here's where Im getti

Re: [GENERAL] PosttgreSQL on AIX

2010-06-02 Thread Merlin Moncure
On Tue, Jun 1, 2010 at 8:39 PM, Ernesto Quiñones wrote: > How  many concurrence can support a server with 4 PPC Power 6 and 16GB RAM??!! > > I was thinking install the load balancing in this machine but maybe I > could run PostgreSQL in this machine without problems for my > concurrence For basic

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread Bruce Momjian
Craig Ringer wrote: > See the attached demo (pop all files in the same directory then run "make"). > > > > I would have > > imagined that ultimately, the call to the Pg C function must return, > > and therefore cannot affect stack unwinding within the C++ part of the > > program. > > That's the

Re: [GENERAL] postgres authentication against Windows Domain

2010-06-02 Thread Stephen Frost
* Joshua Tolley (eggyk...@gmail.com) wrote: > On Tue, Jun 01, 2010 at 11:56:19AM -0600, u235sentinel wrote: > >Is there is a way to connect postgres to authenticate against a windows > >domain without recompiling and using gssapi. Ldap perhaps? I'm still trying to figure out why you would

Re: [GENERAL] postgres authentication against Windows Domain

2010-06-02 Thread Joshua Tolley
On Tue, Jun 01, 2010 at 11:56:19AM -0600, u235sentinel wrote: >Is there is a way to connect postgres to authenticate against a windows >domain without recompiling and using gssapi. Ldap perhaps? > >Thanks! This page describes, among other things, LDAP authentication: http://www.postg

Re: [GENERAL] Statement Pooling

2010-06-02 Thread Joshua Tolley
On Wed, Jun 02, 2010 at 10:10:24AM +0200, Janning wrote: > But I remember a post of tom lane who said that prepared statements get > replaned since 8.4 if underlying statistics change. But I really can't find > it. > Maybe I do not remember correctly. I saw a similar post yesterday, and think I

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread David Fetter
On Wed, Jun 02, 2010 at 10:11:37AM +0800, Craig Ringer wrote: > On 02/06/10 09:23, Bruce Momjian wrote: > > Tom Lane wrote: > >> Craig Ringer writes: > >>> On 01/06/10 11:05, Tom Lane wrote: > I'd be interested to see a section like this written by someone who'd > actually done a nontriv

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread David Fetter
On Tue, Jun 01, 2010 at 06:16:06PM -0400, m. hvostinski wrote: > Hi, > > I have a simple query like: > > SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10) > > The problem is that I need to retrieve the rows in the same order as > the set of ids provided in the select statement. Can it be d

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-02 Thread Scott Marlowe
On Tue, Jun 1, 2010 at 10:00 PM, wrote: > I'm concerned that just because I *can* create duplicate indexes, it doesn't > mean I *should*. > I'm worried it might actually break the service worse than the locking that >I'm trying to avoid. > Does anyone know which index will be used if there are

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread Craig Ringer
On 02/06/10 19:17, Peter Geoghegan wrote: >> Similarly, calling Pg code that may use Pg's error handling from within >> C++ is unsafe. It should be OK if you know for absolute certain that the >> C++ call tree in question only has plain-old-data (POD) structs and >> simple variables on the stack,

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Andreas Kretschmer
Tim Landscheidt wrote: > When using CASE, make sure you read the documentation to the > end: I stumbled upon "CASE id WHEN 23 THEN 1 WHEN 56 THEN 2 > WHEN [...] END" only just recently by pure chance :-). Yeah, you are right ;-) Andreas -- Really, I'm not out to destroy Microsoft. That will ju

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Tim Landscheidt
Andreas Kretschmer wrote: >> I have a simple query like: >> SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10) >> The problem is that I need to retrieve the rows in the same order as the set >> of >> ids provided in the select statement. Can it be done? > No. The only way is: > select *

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-02 Thread Alban Hertroys
On 2 Jun 2010, at 6:00, wrote: > My understanding was that the index would not be updated for inserts to the > actual table - which is why one has to reindex or drop the index and create > it again (with concurrently if you don't want to block reads). Am I missing > something? That's defini

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread A. Kretschmer
In response to Stephen Frost : > * m. hvostinski (makhv...@gmail.com) wrote: > > I have a simple query like: > > > > SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10) > > > > The problem is that I need to retrieve the rows in the same order as the set > > of ids provided in the select statem

Re: [GENERAL] How do we get the Client-Time and Server-Time from psql ?

2010-06-02 Thread Stephen Frost
* raghavendra t (raagavendra@gmail.com) wrote: > How do i get the client time and server time. I am connecting remotely. If i > give SELECT CURRENT_TIME;,it shows the server time. How do we get the client > time ? uh, \! date ? Stephen signature.asc Description: Digital signature

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Andreas Kretschmer
m. hvostinski wrote: > Hi, > > I have a simple query like: > > SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10) > > The problem is that I need to retrieve the rows in the same order as the set > of > ids provided in the select statement. Can it be done? No. The only way is: select * f

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Sam Mason
On Tue, Jun 01, 2010 at 06:16:06PM -0400, m. hvostinski wrote: > I have a simple query like: > > SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10) > > The problem is that I need to retrieve the rows in the same order as the set > of ids provided in the select statement. Can it be done? Yes,

Re: [GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread Stephen Frost
* m. hvostinski (makhv...@gmail.com) wrote: > I have a simple query like: > > SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10) > > The problem is that I need to retrieve the rows in the same order as the set > of ids provided in the select statement. Can it be done? Not very easily. My fi

Re: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-06-02 Thread Stephen Frost
* Tom Wilcox (hungry...@googlemail.com) wrote: > My plan now is to try increasing the shared_buffers, work_mem, > maintenance_work_mem and apparently checkpoint_segments and see if that > fixes it. er. work_mem and maintenance_work_mem aren't *limits*, they're more like *targets*. The ou

Re: [GENERAL] Disable executing external commands from psql?

2010-06-02 Thread Stephen Frost
* Ken Tanzer (ken.tan...@gmail.com) wrote: > My experience has been that for some reason these folks just don't want > to download and configure a Linux environment just to be able to "kick > the tires" on this thing. So I was thinking self-serve-created demo > accounts would be a good way t

[GENERAL] Is it possible to make the order of output the same as the order of input parameters?

2010-06-02 Thread m. hvostinski
Hi, I have a simple query like: SELECT * FROM customer WHERE id IN (23, 56, 2, 12, 10) The problem is that I need to retrieve the rows in the same order as the set of ids provided in the select statement. Can it be done? Thanks

Re: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-06-02 Thread Tom Wilcox
I have now hit a new query that produces Out of memory errors in a similar way to the last ones. Can anyone please suggest why I might be getting this error and any way I can go about diagnosing or fixing it.. The error I get is: ERROR: out of memory SQL state: 53200 Detail: Failed on request

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-02 Thread Gareth.Williams
> When you have two exactly the same index definitions, that's just a > waste of resources. There will be used only one of them for speeding up > selects, but all of them must be updated during insert/update/delete > operations. Thanks Szymon, I appreciate the info. The duplication wou

Re: [GENERAL] Statement Pooling

2010-06-02 Thread Janning
> > > > I remember postgresql 8.4 is replanning prepared statements when > > > > statistics change occur, but I didn't find it in the release notes. > > > > It is just saying "Invalidate cached plans when referenced schemas, > > > > functions, operators, or operator classes are modified". Does PG >

Re: [GENERAL] server-side extension in c++

2010-06-02 Thread Peter Geoghegan
> Letting an exception thrown from C++ code cross into C code will be > EXTREMELY ugly. The C++-to-C boundaries *must* have unconditional catch > blocks to convert thrown exceptions into appropriate error codes, even > if the C++ code in question never knowingly throws an exception. C++ may > throw

[GENERAL] tsearch2 & dictionaries - possible problem

2010-06-02 Thread Ivan Voras
hello, I think I have a problem with tsearch2 configuration I'm trying to use. I have created a text search configuration as: -- CREATE TEXT SEARCH DICTIONARY hr_ispell ( TEMPLATE = ispell, DictFile = 'hr', AffFile = 'hr', StopWords = 'hr' ); CREATE TEXT SEARCH CONFIGURATION publ

Re: [GENERAL] How do we get the Client-Time and Server-Time from psql ?

2010-06-02 Thread Raymond O'Donnell
On 02/06/2010 10:48, raghavendra t wrote: > Hi All, > > How do i get the client time and server time. I am connecting > remotely. If i give SELECT CURRENT_TIME;,it shows the server time. > How do we get the client time ? I don't think you can, from within a query anyway - it's always going to run

[GENERAL] How do we get the Client-Time and Server-Time from psql ?

2010-06-02 Thread raghavendra t
Hi All, How do i get the client time and server time. I am connecting remotely. If i give SELECT CURRENT_TIME;,it shows the server time. How do we get the client time ? Thanks in Advance Regards Raghavendra

Re: [GENERAL] What Linux edition we should chose?

2010-06-02 Thread Adrian von Bidder
On Wednesday 02 June 2010 07.51:50 Bret S. Lambert wrote: > Getting the wrong answer fast is not an > improvement over the right answer slow. Doesn't match reality. Listened to any politicians lately? (sorry, couldn't resist.) -- vbi -- In seiner mit Hochspannung erwarteten Rede zur Lage der

[GENERAL] Minimal Postgresql installation for embedded app on Windows 32

2010-06-02 Thread Frank Church
I want to install postgresql as an embedded database and I am looking to install the most minimal installation, with perhaps some support for ODBC. I prefer to install it all in a separate directory so it does not affect any standard PostgreSQL installation on the same computer, running it as a dif