Re: [GENERAL] Rules, Windows and ORDER BY

2012-08-24 Thread Jason Dusek
2012/8/23 Tom Lane t...@sss.pgh.pa.us: Jason Dusek jason.du...@gmail.com writes: I have a simple table of keys and values which periodically receives updated values. It's desirable to keep older values but, most of the time, we query only for the latest value of a particular key. CREATE

Re: [GENERAL] Rules, Windows and ORDER BY

2012-08-24 Thread Martijn van Oosterhout
On Fri, Aug 24, 2012 at 09:32:32AM +, Jason Dusek wrote: 2012/8/23 Tom Lane t...@sss.pgh.pa.us: Jason Dusek jason.du...@gmail.com writes: CREATE TABLE kv ( k bytea NOT NULL, at timestamptz NOT NULL, realm bytea NOT NULL, v bytea NOT NULL ); CREATE INDEX ON kv

Re: [GENERAL] FETCH in subqueries or CTEs

2012-08-24 Thread Craig Ringer
On 08/24/2012 12:34 PM, Pavel Stehule wrote: you can't mix planned and unplanned statements together - think about stored plans every time Thanks Pavel and Jeff. I can't say I fully understand the arguments, but I'll take it that accepting cursors in CTEs or subqueries wouldn't make sense.

Re: [GENERAL] Windows SIngle Sign On - LINUX Server

2012-08-24 Thread SUNDAY A. OLUTAYO
LDAP will be your best choice for SSO, Ubuntu Linux can authenticate against AD. Also this is OS stuff not PostgreSQL, if you server is in production and you can not handle this migration, it is advisable that you subscribe for support on Ubuntu from canonical Thanks, Sunday Olutayo

[GENERAL] I: Installation faillure version 8.4.12

2012-08-24 Thread Segato Luca
Dear All We try to install, several times, postgres version 8.4.12, each installation was failed during the post-install step displaying this error: (install-postgresql.log) Executing cscript //NoLogo F:\postgressql/installer/server/initcluster.vbs postgres postgres F:\postgressql

Re: [GENERAL] I: Installation faillure version 8.4.12

2012-08-24 Thread Ashesh Vashi
On Fri, Aug 24, 2012 at 4:47 PM, Segato Luca lseg...@prholding.it wrote: ** ** Dear All We try to install, several times, postgres version 8.4.12, each installation was failed during the “post-install step ” displaying this error: (install-postgresql.log) ** **

Re: [GENERAL] Interval 1 month is equals to interval 30 days - WHY?

2012-08-24 Thread Dmitry Koterov
BTW there are a much more short version of this: CREATE OR REPLACE FUNCTION int_equal(interval, interval) RETURNS boolean IMMUTABLE STRICT LANGUAGE sql AS 'SELECT $1::text = $2::text'; On Wed, Aug 8, 2012 at 4:51 PM, Albe Laurenz laurenz.a...@wien.gv.atwrote: Then maybe you should use

Re: [GENERAL] Windows SIngle Sign On - LINUX Server

2012-08-24 Thread Craig Ringer
On 08/24/2012 06:10 PM, SUNDAY A. OLUTAYO wrote: LDAP will be your best choice for SSO, Ubuntu Linux can authenticate against AD. I'm not at all convinced by that. Active Directory functions as a Kerberos KDC. Kerberos provides secure authentication and (unlike LDAP) single sign-on.

Re: [GENERAL] Windows SIngle Sign On - LINUX Server

2012-08-24 Thread SUNDAY A. OLUTAYO
In real world deployment, LDAP and Kerbero are often combined for authentication and authorization. The link below is a well documented howto: https://help.ubuntu.com/community/SingleSignOn Thanks, Sunday Olutayo - Original Message - From: Craig Ringer ring...@ringerc.id.au To:

[GENERAL] create table like . . . constraint names

2012-08-24 Thread Sahagian, David
Is there any way for me to control the name of the (unique or primary) constraints that get created when doing a create table like parent-table statement ? I use this statement to create the new table in a different schema than the one in which the parent-table lives, and I would like the

Re: [GENERAL] FETCH in subqueries or CTEs

2012-08-24 Thread Pavel Stehule
2012/8/24 Craig Ringer ring...@ringerc.id.au: On 08/24/2012 12:34 PM, Pavel Stehule wrote: you can't mix planned and unplanned statements together - think about stored plans every time Thanks Pavel and Jeff. I can't say I fully understand the arguments, but I'll take it that accepting

Re: [GENERAL] FETCH in subqueries or CTEs

2012-08-24 Thread Tom Lane
Craig Ringer ring...@ringerc.id.au writes: I didn't find a reasonable way to simply fetch a cursor into a (possibly temporary) table, like: INSERT INTO sometable FETCH ALL FROM somecursor; Why would you bother with a cursor, and not just INSERT ... SELECT using the original query? Putting a

Re: [GENERAL] Rules, Windows and ORDER BY

2012-08-24 Thread Tom Lane
Martijn van Oosterhout klep...@svana.org writes: On Fri, Aug 24, 2012 at 09:32:32AM +, Jason Dusek wrote: Why are the individual indices not useful? The tests that the query does -- equality on key and realm and ordering on at -- are each supported by indices. Does it have to do with the

Re: [GENERAL] Check PostgreSQL status using MS-DOS bat file?

2012-08-24 Thread Loughrey, Hugh
Hi Dinesh, Managed to get this up and running...thanks!! Regards Hugh From: dinesh kumar [mailto:dineshkuma...@gmail.com] Sent: 17 August 2012 13:15 To: Loughrey, Hugh Cc: Postgres General Subject: Re: [GENERAL] Check PostgreSQL status using MS-DOS bat file? Hi , Dave's instructions are

Re: [GENERAL] At what point does a big table start becoming too big?

2012-08-24 Thread Gavin Flower
On 23/08/12 11:06, Nick wrote: I have a table with 40 million rows and haven't had any performance issues yet. Are there any rules of thumb as to when a table starts getting too big? For example, maybe if the index size is 6x the amount of ram, if the table is 10% of total disk space, etc?

[GENERAL] run function on server restart

2012-08-24 Thread John D. West
Sometimes the server process crashes and restarts, usually when I run some large calculations that eat up all available memory. Is there any way to detect this and run a cleanup routine when it happens? Running 8.4 on Ubuntu. -- John

[GENERAL] Overlapping time ranges constraints in 8.4

2012-08-24 Thread EXT-Rothermel, Peter M
I have a temporal data question that may be much easier to handle in version 9.x but I am stuck on version 8.4. One table has a time range that is implemented as start_time and end_time columns of type TIMESTAMP with Timezone. A second table has information that is needed to determine if there

Re: [GENERAL] Overlapping time ranges constraints in 8.4

2012-08-24 Thread Kevin Grittner
EXT-Rothermel, Peter M peter.m.rother...@boeing.com wrote: I have a temporal data question that may be much easier to handle in version 9.x but I am stuck on version 8.4. That is unfortunate. Getting this to work correctly in 8.4 will probably be a lot more work than upgrading to 9.1 and

Re: [GENERAL] run function on server restart

2012-08-24 Thread Kevin Grittner
John D. West john.d.w...@asu.edu wrote: Sometimes the server process crashes and restarts, usually when I run some large calculations that eat up all available memory. You might want to reconfigure to avoid that. Is there any way to detect this and run a cleanup routine when it happens?

Re: [GENERAL] Windows SIngle Sign On - LINUX Server

2012-08-24 Thread Jeremy Palmer
Marcus' guide looks great. So what's the pros/cons of using the Kerberos via GSSAPI method, rather than going for the SingleSignOn method mentioned by Sunday? From: SUNDAY A. OLUTAYO [olut...@sadeeb.com] Sent: Saturday, 25 August 2012 12:00 a.m. To:

[GENERAL] Does continue in a loop not commit any changes

2012-08-24 Thread Rhys A.D. Stewart
Greetings all, Having an issue with the pl/pgsql function below. I may or may not make an update to a table in the first IF statement. However, whenever an update is made, if the loop is continued then the update is not committed. Is it that whenever a loop is not completed rows aren't written?

Re: [GENERAL] Cannot Run EnterpriseDB Postgresql Installation

2012-08-24 Thread javad M
Hi, I solved it. I had created a directory junction in default downloads location to another directory in another drive. The installer was running from there and giving this error. I just remembered and though to check it from normal directory and yup, installer was running and installed fine and

Re: [GENERAL] run function on server restart

2012-08-24 Thread John D. West
I have various background processes outside of postgres that need to be killed and restarted after the server reboots. -- John On Fri, Aug 24, 2012 at 2:29 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: John D. West john.d.w...@asu.edu wrote: Sometimes the server process

Re: [GENERAL] run function on server restart

2012-08-24 Thread Rob Sargent
On 08/24/2012 03:46 PM, John D. West wrote: I have various background processes outside of postgres that need to be killed and restarted after the server reboots. -- John On Fri, Aug 24, 2012 at 2:29 PM, Kevin Grittner kevin.gritt...@wicourts.gov mailto:kevin.gritt...@wicourts.gov

[GENERAL] fast-archiver tool, useful for pgsql DB backups

2012-08-24 Thread Mathieu Fenniak
Hi pgsql-general, Has anyone else ever noticed how slow it can be to rsync or tar a pgdata directory with hundreds of thousands or millions of files? I thought this could be done faster with a bit of concurrency, so I wrote a little tool called fast-archiver to do so. My employer (Replicon) has

Re: [GENERAL] run function on server restart

2012-08-24 Thread Kevin Grittner
John D. West john.d.w...@asu.edu wrote: I have various background processes outside of postgres that need to be killed and restarted after the server reboots. All of our applications are coded such that when they have an error on a database connection, they check for a serialization failure

Re: [GENERAL] run function on server restart

2012-08-24 Thread John D. West
I *think* my independent processes are cleaning up in that they supposedly abort themselves if they lose db connection, but on restart there is a table of pid's I'd like to (1) make sure all of the processes are really dead, killing any who aren't (2) reset flags in a table showing the status of