Re: [GENERAL] log_statement and syslog severity

2010-03-10 Thread Stuart Bishop
On Wed, Mar 10, 2010 at 8:51 AM, Bruce Momjian br...@momjian.us wrote: Greg Sabino Mullane wrote: Bruce replied: ... This means that, even using syslog as a destination, it's not possible for me to filter statements without some sort of log-text parsing, which I'd prefer to avoid on

Re: [GENERAL] log_statement and syslog severity

2010-03-10 Thread Magnus Hagander
2010/3/10 Stuart Bishop stu...@stuartbishop.net: On Wed, Mar 10, 2010 at 8:51 AM, Bruce Momjian br...@momjian.us wrote: Greg Sabino Mullane wrote: Bruce replied: ... This means that, even using syslog as a destination, it's not possible for me to filter statements without some sort

Re: [GENERAL] How to? Timestamp with timezone.

2010-03-10 Thread Andre Lopes
Hi, Thanks for the reply's. [code] ALTER DATABASE foo SET timezone TO 'someval' ALTER ROLE bar SET timezone TO 'someval' [/code] I need to alter only the Timezone of the database OR I need also to alter the Role? Best Regards, On Wed, Mar 10, 2010 at 1:06 AM, Alvaro Herrera

Re: [GENERAL] Urgent help needed- alias name in update statement

2010-03-10 Thread Albe Laurenz
Venkat wrote: In postgre, when i am trying to give alias name in update statement like below - - update mytable x set x.name = 'asdf' where x.no = 1 --- is giving error - mytable is not having col x. We have

[GENERAL] make available C extensions to others

2010-03-10 Thread Ivan Sergio Borgonovo
I've finished to write an extension to manipulate tsvectors and tsquery in C. I think it could be useful for someone else and I think I may take advantage at someone else looking at the code too. What would be the right place where to publish the code and how? -- Ivan Sergio Borgonovo

Re: [GENERAL] make available C extensions to others

2010-03-10 Thread Dimitri Fontaine
Ivan Sergio Borgonovo m...@webthatworks.it writes: I've finished to write an extension to manipulate tsvectors and tsquery in C. I think it could be useful for someone else and I think I may take advantage at someone else looking at the code too. What would be the right place where to

[GENERAL] regexp_replace puzzle

2010-03-10 Thread Harald Fuchs
I've got a problem with regexp_replace which I could reduce to the following: CREATE FUNCTION digest(text, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_digest'; CREATE FUNCTION sha224enc(text) RETURNS text AS $$ BEGIN RAISE WARNING 'arg=»%«',

Re: [GENERAL] How to? Timestamp with timezone.

2010-03-10 Thread Alvaro Herrera
Andre Lopes escribió: Hi, Thanks for the reply's. [code] ALTER DATABASE foo SET timezone TO 'someval' ALTER ROLE bar SET timezone TO 'someval' [/code] I need to alter only the Timezone of the database OR I need also to alter the Role? One of them suffices. -- Alvaro Herrera

Re: [GENERAL] regexp_replace puzzle

2010-03-10 Thread Osvaldo Kussama
2010/3/10 Harald Fuchs hari.fu...@gmail.com: I've got a problem with regexp_replace which I could reduce to the following:  CREATE FUNCTION digest(text, text) RETURNS bytea      LANGUAGE c IMMUTABLE STRICT      AS '$libdir/pgcrypto', 'pg_digest';  CREATE FUNCTION sha224enc(text) RETURNS

[GENERAL] Licence

2010-03-10 Thread Jonathan Tripathy
Hi Everyone, Can someone please confirm that the PostgreSQL licence allow commercial distribution (with a fee charged)? I am developing a proprietary (i.e. non-free) solution in Java, and wish to use PostgreSQL as the backend database. We wish to ship the server with our software, as well as

Re: [GENERAL] Licence

2010-03-10 Thread Thom Brown
On 10 March 2010 14:49, Jonathan Tripathy jon...@abpni.co.uk wrote: Hi Everyone, Can someone please confirm that the PostgreSQL licence allow commercial distribution (with a fee charged)? I am developing a proprietary (i.e. non-free) solution in Java, and wish to use PostgreSQL as the

Re: [GENERAL] Licence

2010-03-10 Thread Bill Moran
In response to Jonathan Tripathy jon...@abpni.co.uk: I know the PostgreSQL licence is based on the BSD licence, however the line which says without fee rings alarm bells, even though I think it means that you don't have ot pay anything to the PostgreSQL developers rather than if you

[GENERAL] Statement Triggers

2010-03-10 Thread Gordan Bobic
Hi, Can anyone point me at a comprehensive example of statement (as opposed to row) triggers? I've googled it and looked through the documentation, but couldn't find a complete example relevant to what I'm trying to do. Specifically, what features of the SQL statement that triggered the event

Re: [GENERAL] log_statement and syslog severity

2010-03-10 Thread Ben Chobot
On Mar 10, 2010, at 12:15 AM, Stuart Bishop wrote: syslog doesn't give you easily machine readable output. I'm not sure how syslog implementations handle high load (our sysadmins won't use it, so I haven't investigated this further). Have you looked into syslog-ng? I believe it does just

Re: [GENERAL] regexp_replace puzzle

2010-03-10 Thread David W Noon
On Wed, 10 Mar 2010 13:41:54 +0100, Harald Fuchs wrote about [GENERAL] regexp_replace puzzle: [snip] SELECT val, regexp_replace(val, '^(.*\W)?(C\d{7}|[DI]\d{6}|S\d{10})(\W.*)?$', '\1' || '»\2«='|| sha224enc('\2') || '\3', 'i') [snip] i.e. the first '\2' gets

Re: [GENERAL] How to? Timestamp with timezone.

2010-03-10 Thread Steve Crawford
Andre Lopes wrote: [code] ALTER DATABASE foo SET timezone TO 'someval' ALTER ROLE bar SET timezone TO 'someval' [/code] I need to alter only the Timezone of the database OR I need also to alter the Role? Timestamp and timezone handling in PostgreSQL is very powerful. Think of it as a

Re: [GENERAL] Licence

2010-03-10 Thread Steve Crawford
Bill Moran wrote: In response to Jonathan Tripathy jon...@abpni.co.uk: I know the PostgreSQL licence is based on the BSD licence, however the line which says without fee rings alarm bells, even though I think it means that you don't have ot pay anything to the PostgreSQL developers rather

Re: [GENERAL] Connection timeouts from pgAdmin

2010-03-10 Thread Lee Hachadoorian
John, Just wanted to reply that this seems to have been the right track. Rather than change the firewall settings, our network administrator was able set postgres to send a keepalive to the client. Thanks, --Lee On Thu, Mar 4, 2010 at 5:26 PM, Lee Hachadoorian lee.hachadoor...@gmail.com wrote:

Re: [GENERAL] log_statement and syslog severity

2010-03-10 Thread dennis jenkins
On Wed, Mar 10, 2010 at 10:55 AM, Ben Chobot be...@silentmedia.com wrote: On Mar 10, 2010, at 12:15 AM, Stuart Bishop wrote: syslog doesn't give you easily machine readable output. I'm not sure how syslog implementations handle high load (our sysadmins won't use it, so I haven't

[GENERAL] crosstab functionality for postgres 8.1.4

2010-03-10 Thread Amol Chiplunkar
Hi, My postgres 8.1.4 installation does not have the crosstab functions. Most likely due to unavailability of contrib/tablefunc module. Is there a std version of tablefunc .so that can be downloaded and used ? thanks - Amol -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

[GENERAL] Naming conventions for lots of stored procedures

2010-03-10 Thread Chris Travers
Hi all; One of my applications currently has over 60 stored procedures and future versions will likely have several hundred. I am wondering what folks find to be helpful naming conventions for managing a large number of stored procedures. We tried using double underscores to separate module vs

Re: [GENERAL] log_statement and syslog severity

2010-03-10 Thread Bruce Momjian
Stuart Bishop wrote: -- Start of PGP signed section. On Wed, Mar 10, 2010 at 8:51 AM, Bruce Momjian br...@momjian.us wrote: Greg Sabino Mullane wrote: Bruce replied: ... This means that, even using syslog as a destination, it's not possible for me to filter statements without

[GENERAL] Finding duplicates only.

2010-03-10 Thread Greenhorn
Hi, Can someone please help me with this duplicate query. I'm trying to: 1. Return duplicates only. (without including the first valid record), and 2. Return as duplicate if the difference between a.inspection_time and b.inspection time is under 5 minutes. Here's the query string I'm using

[GENERAL] dst question

2010-03-10 Thread jgirvin
the to_timestamp shows the offset at +09:30 when within the hour of the dst changeover and is this expected cheers. -- James. __ Information from ESET NOD32 Antivirus, version of virus signature database 4933 (20100310) __ The message was checked by ESET NOD32

Re: [GENERAL] crosstab functionality for postgres 8.1.4

2010-03-10 Thread Merlin Moncure
On Wed, Mar 10, 2010 at 7:00 PM, Amol Chiplunkar amol.chiplun...@sun.com wrote: Hi, My postgres 8.1.4 installation does not have the crosstab functions. Most likely due to unavailability of contrib/tablefunc module. does too!

Re: [GENERAL] Naming conventions for lots of stored procedures

2010-03-10 Thread Justin Graf
On 3/10/2010 8:16 PM, Chris Travers wrote: Hi all; One of my applications currently has over 60 stored procedures and future versions will likely have several hundred. I am wondering what folks find to be helpful naming conventions for managing a large number of stored procedures. We tried

Re: [GENERAL] SAS Raid10 vs SATA II Raid10 - many small reads and writes

2010-03-10 Thread Phillip Berry
On Wednesday 10 March 2010 18:32:41 Scott Marlowe wrote: On Tue, Mar 9, 2010 at 11:49 PM, Phillip Berry pbe...@stellaconcepts.com wrote: Hi Everyone, We're in the market for a new DB server to replace our current one (yes it's one of *those* questions) ;). It'll have quad core

Re: [GENERAL] crosstab functionality for postgres 8.1.4

2010-03-10 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes: On Wed, Mar 10, 2010 at 7:00 PM, Amol Chiplunkar amol.chiplun...@sun.com wrote: My postgres 8.1.4 installation does not have the crosstab functions. Most likely due to unavailability of contrib/tablefunc module. does too! I think the problem is the

Re: [GENERAL] Naming conventions for lots of stored procedures

2010-03-10 Thread Chris Travers
On Wed, Mar 10, 2010 at 7:08 PM, Justin Graf jus...@magwerks.com wrote: look into schemas. this allow group table and procedure logically and can limit access based on schemas. what i did is group procedures, views, and tables into schemas  to keep them logically grouped. in one project

Re: [GENERAL] dst question

2010-03-10 Thread Tom Lane
jgirvin james.gir...@oasissystems.com.au writes: Australia will come out of DST on the 4th April 2010 at 03:00:00 and will be +9:30 from utc, currently we are +10:30 utc. OK, so this is a fall back transition for you guys, right? This is 4 seconds into the last hour prior to dst changeover,

Re: [GENERAL] Finding duplicates only.

2010-03-10 Thread A. Kretschmer
In response to Greenhorn : Hi, Can someone please help me with this duplicate query. I'm trying to: 1. Return duplicates only. (without including the first valid record), and I will try to help you. Assuming this table: test=*# select * from greenhorn order by id; id |

Re: [GENERAL] Statement Triggers

2010-03-10 Thread A. Kretschmer
In response to Gordan Bobic : Specifically, what features of the SQL statement that triggered the event are available to the function invoked by the trigger? Say I wanted to write http://www.postgresql.org/docs/8.4/interactive/plpgsql-trigger.html Except for NEW and OLD. all INSERT

Re: [GENERAL] SAS Raid10 vs SATA II Raid10 - many small reads and writes

2010-03-10 Thread Magnus Hagander
On Thursday, March 11, 2010, Phillip Berry pbe...@stellaconcepts.com wrote: On Wednesday 10 March 2010 18:32:41 Scott Marlowe wrote: On Tue, Mar 9, 2010 at 11:49 PM, Phillip Berry pbe...@stellaconcepts.com wrote: Hi Everyone, We're in the market for a new DB server to replace our current