Re: [GENERAL] MySQL PASSWORD('x') function workalike

2000-10-19 Thread Marko Kreen
On Wed, Oct 18, 2000 at 03:11:12PM -0700, Nate Lawson wrote: In MySQL, I can get a hash of a VARCHAR by using the PASSWORD('') call. I know for DB admin there is pg_passwd, but is there a function interface so that I can get password hashes of arbitrary strings in SQL? (Note that I mean

Re: [GENERAL] using crypt authentication

2001-01-07 Thread Marko Kreen
On Thu, Jan 04, 2001 at 10:39:14AM -0700, T F wrote: Does anyone know how to get pgaccess and libpq/libpq++ to crypt the passwords? I'd like to use crypt in my pg_hba.conf file for all hosts, but when I do the only way I can connect is via psql and a relatively new version of the perl

Re: [GENERAL] DES encryption in Postgres?

2001-01-09 Thread Marko Kreen
On Tue, Jan 09, 2001 at 04:54:36AM -, [EMAIL PROTECTED] wrote: I looked through all the docs, and I couldn't find a function which would simply DES encrypt a string. Is DES not implemented in Postgres? Or am I just not finding the function? It is not implemented. In 7.1 you'll find

Re: [GENERAL] Re: DES in Postgres?

2001-03-01 Thread Marko Kreen
On Thu, Mar 01, 2001 at 11:27:15AM +0100, Karel Zak wrote: On Thu, Mar 01, 2001 at 08:59:38AM -, [EMAIL PROTECTED] wrote: Is there a function in Postgres which will DES-encrypt a given string with a given key? If not, has anyone out there written a linkable C function to do that?

[GENERAL] [Announce] pgcrypto 0.3 (long)

2001-03-11 Thread Marko Kreen
pgcrypto 0.3 / "why-dont-you-show-some-code" release http://www.l-t.ee/marko/pgsql/pgcrypto-0.3.tar.gz This release is give people something to play with. Parts of it need further thinking and lots of testing, but I am tired of sitting on it. Here follow parts from README to give an

Re: [GENERAL] fmgr, C , and character arguments

2001-03-27 Thread Marko Kreen
On Tue, Mar 27, 2001 at 03:45:17PM -0700, Joel Dudley wrote: Hello all, I am having a bit of trouble getting my arguments formatted into a command string for system(). Here is what I have so far for code. #include string.h #include stdlib.h #include "postgres.h" #include "fmgr.h"

Re: [GENERAL] JDBC and Perl compiling problems w/ postgresql-7.1rc4

2001-04-10 Thread Marko Kreen
On Mon, Apr 09, 2001 at 03:33:19PM -0700, Homayoun Yousefi'zadeh wrote: I first ran configure with the following options ./configure --with-perl --with-tcl --enable-odbc --with-java --enable-syslog --enable-debug and then compiled postgresql-7.1rc4 on Redhat 7.0 successfully with

Re: [GENERAL] crypt(table.field) ?

2001-04-26 Thread Marko Kreen
On Thu, Apr 26, 2001 at 09:15:45AM -0500, will trillich wrote: i know password can be used in creating/altering user information (as used via GRANT and REVOKE) but is there any facility within postgres to CRYPT() a value? At the moment no. You should patch your PostgreSQL source for that.

Re: [GENERAL] crypt(table.field) ?

2001-04-26 Thread Marko Kreen
On Thu, Apr 26, 2001 at 02:01:46PM -0500, will trillich wrote: On Thu, Apr 26, 2001 at 05:20:53PM +0200, Peter Eisentraut wrote: will trillich writes: i know password can be used in creating/altering user information (as used via GRANT and REVOKE) but is there any facility within

Re: [GENERAL] JDBC and Accents

2001-04-27 Thread Marko Kreen
On Fri, Apr 27, 2001 at 02:36:21PM +0200, Loïc Courtois wrote: On Fri, Apr 27, 2001 at 01:56:38AM +0200, Loïc Courtois wrote: Hello, I have some problems to display the accents in my db, using the JDBC and postgres 7.1. Apparently, all accents are replaced by a '?'. What

Re: [GENERAL] how to get the md5 result of a string ?

2001-09-10 Thread Marko Kreen
On Mon, Sep 10, 2001 at 11:40:27PM +0200, Feite Brekeveld wrote: Is there a function like: select md5(attribute_name) from digest(field, 'md5') If you want in hex: encode(digest(field, 'md5'), 'hex') Look into contrib/pgcrypto in PostgreSQL source. -- marko

Re: [GENERAL] Function exists

2001-09-25 Thread Marko Kreen
On Tue, Sep 25, 2001 at 02:20:23PM -0400, Mihai Gheorghiu wrote: I want to write a function that finds out whether a function already exists. Is that possible? How? select * from pg_proc where proname = ??; you can run psql with switch -E, then it shows intenal queries it performs. Eg., for

Re: [GENERAL] kinda newbie - ish question

2001-10-10 Thread Marko Kreen
On Mon, Oct 08, 2001 at 07:31:36PM -0700, Mike Judkins wrote: Im trying to insert a record with a php script. I insert a NULL value to get my auto increment unique key to automatically populate as usual. Then I want to be able to insert another value in this same row which is a URL. This URL

Re: [GENERAL] Geographic High-Availability/Replication

2007-08-27 Thread Marko Kreen
On 8/26/07, Bill Moran [EMAIL PROTECTED] wrote: I'm curious as to how Postgres-R would handle a situation where the constant throughput exceeded the processing speed of one of the nodes. Such situation is not a specific problem to Postgres-R or to synchronous replication in general.

Re: [GENERAL] Out of Memory - 8.2.4

2007-08-28 Thread Marko Kreen
On 8/24/07, Jeff Amiel [EMAIL PROTECTED] wrote: Over last 2 days, have spotted 10 Out of Memory errors in postgres logs (never saw before with same app/usage patterns on tuned hardware/postgres under FreeBSD) Aug 22 18:08:24 db-1 postgres[16452]: [ID 748848 local0.warning] [6-1] 2007-08-22

Re: [GENERAL] Out of Memory - 8.2.4

2007-08-30 Thread Marko Kreen
On 8/29/07, Tom Lane [EMAIL PROTECTED] wrote: Alvaro Herrera [EMAIL PROTECTED] writes: I'm not having much luck really. I think the problem is that ANALYZE stores reltuples as the number of live tuples, so if you delete a big portion of a big table, then ANALYZE and then VACUUM, there's a

Re: [GENERAL] Out of Memory - 8.2.4

2007-08-30 Thread Marko Kreen
On 8/30/07, Tom Lane [EMAIL PROTECTED] wrote: Marko Kreen [EMAIL PROTECTED] writes: Note that it's much better to err on the smaller values. Extra index pass is really no problem. I beg to differ ... Well, if Postgres tries to cut down passes by using max memory then admin is forced

Re: [GENERAL] Connection pooling

2007-09-07 Thread Marko Kreen
On 9/7/07, Max Zorloff [EMAIL PROTECTED] wrote: On Fri, 07 Sep 2007 10:58:36 +0400, Marko Kreen [EMAIL PROTECTED] wrote: The pgpool (I tried 3.1, 3.4 and pgpool-II 1.2) works fine but has the following problem - after some time it just hangs, and if I try to connect to it with psql it just

Re: [GENERAL] Connection pooling

2007-09-07 Thread Marko Kreen
On 9/6/07, Max Zorloff [EMAIL PROTECTED] wrote: Hello. I'm using Apache + PHP + Postgres for my project. I've tried the two poolers people usually recommend here - pgbouncer and pgpool. I have a problem with pgbouncer - under the load the query execution becomes ~10 times slower than it

Re: [GENERAL] Sthange things happen: SkyTools pgbouncer is NOT a balancer

2007-09-11 Thread Marko Kreen
On 9/11/07, Dmitry Koterov [EMAIL PROTECTED] wrote: We discovered some time ago that pgbouncer is NOT a balancer, because it cannot spread connections/queries to the same database to multiple servers. It's unbeliveable, but it's a fact! So, database name in the config MUST be unique. Indeed,

Re: [GENERAL] pgcrypto: is an IV needed with pgp_sym_encrypt()?

2007-09-18 Thread Marko Kreen
On 9/18/07, Bill Moseley [EMAIL PROTECTED] wrote: I'm just starting with pgcrypto, and I'm curious if it's needed/recommended to use an initialization vector/value (IV) with the pgp_sym_encrypt() function. The docs hint that an IV is used automatically, but encrypting plain text that starts

Re: [GENERAL] md5() sorting

2007-11-07 Thread Marko Kreen
On 11/7/07, Karsten Hilbert [EMAIL PROTECTED] wrote: On Wed, Nov 07, 2007 at 03:54:02PM +0100, Martijn van Oosterhout wrote: Should I be going about this sorting or hashing or detection business in another way entirely which can be done at the SQL level ? I'm wondering if you cast

Re: [GENERAL] Adding contrib modules

2005-08-18 Thread Marko Kreen
On Wed, Aug 17, 2005 at 01:14:43PM -0500, Jonathan Villa wrote: Thanks... at least know I'm doing to correctly... but I still get the errors. I've done everything as it states on the tsearch-V2-intro.html page... and then I run psql ftstest tsearch2.sql fts.out for testing of course

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Marko Kreen
On Tue, Aug 30, 2005 at 07:04:52PM +1200, Bernard wrote: Dear Postgresql Specialists I am failing to update the password of the postgresql user from within a Linux installation script run by root: # su - postgres -c echo ALTER USER postgres WITH PASSWORD 'newpassword'; | psql -U postgres

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Marko Kreen
[This guy has prove-you-arent-bot filtering] On Tue, Aug 30, 2005 at 07:04:52PM +1200, Bernard wrote: I would appreciate your help very much. Unless you turn off your braindead spam-filtering, you are not worth it. Sorry, but you are asking help on a public list, think about it a bit... --

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Marko Kreen
On Tue, Aug 30, 2005 at 09:25:07PM +1200, Bernard wrote: The postgresql.org server is the only braindead list server I have seen so far. http://www.unicom.com/pw/reply-to-harmful.html It is the rule on technical mailing lists. -- marko ---(end of

Re: [GENERAL] Question about 8.1 release news

2005-11-07 Thread Marko Kreen
On Sun, Nov 06, 2005 at 04:35:24PM -0400, Marc G. Fournier wrote: Once released, the more visibility, the better :) Release is schedualed right now for Tuesday morning ... Just a nitpick - should the version be 8.1.0 or 8.1? 'configure.in' says ATM '8.1.0' but the usual would be '8.1'... --

Re: [GENERAL] Encrypted column

2007-06-05 Thread Marko Kreen
On 6/5/07, Tino Wildenhain [EMAIL PROTECTED] wrote: Ranieri Mazili schrieb: Hello, I need to store users and passwords on a table and I want to store it encrypted, but I don't found documentation about it, how can I create a table with columns user and password with column password

Re: [GENERAL] Encrypted column

2007-06-05 Thread Marko Kreen
On 6/5/07, Brian Mathis [EMAIL PROTECTED] wrote: On 6/5/07, Marko Kreen [EMAIL PROTECTED] wrote: Both md5 and sha1 are bad for passwords, no salt and easy to bruteforce - due to the tiny amount of data in passwords. Proper ways is to use crypt() function from pgcrypto module. Due

Re: [GENERAL] Encrypted column

2007-06-05 Thread Marko Kreen
On 6/5/07, Marko Kreen [EMAIL PROTECTED] wrote: both md5 and sha1 are actually easier to bruteforce than the old DES-based crypt. If this statement seems weird - the problem is the speed. MD5 and SHA1 are just faster algorithms than des-crypt. And there's nothing wrong with fast general

Re: [GENERAL] Encrypted column

2007-06-05 Thread Marko Kreen
On 6/5/07, Brian Mathis [EMAIL PROTECTED] wrote: pgcrypto also supports md5, so I'm not sure what you're referring to here. digest(psw, 'md5') vs. crypt(psw, gen_salt('md5')) As I already mentioned, *salting* before you hash is a very important step. I'm not sure if you saw that in my post.

Re: Creditcard Number Security was Re: [GENERAL] Encrypted column

2007-06-05 Thread Marko Kreen
On 6/5/07, Peter Childs [EMAIL PROTECTED] wrote: On 05/06/07, Andrew Sullivan [EMAIL PROTECTED] wrote: On Tue, Jun 05, 2007 at 09:28:00AM -0500, Ron Johnson wrote: If he is a CC customer, the system (which I am DBA of) bills his card directly, saving the customer much time and effort.

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-11-30 Thread Marko Kreen
On 11/29/07, Stefan Niantschur [EMAIL PROTECTED] wrote: I have a table with userids and public keys. I want to write a function which does a select and returns the result pgp encrypted. However, I have some problems: Could you send the keys you have problems with? If actual keys then

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-03 Thread Marko Kreen
On 12/3/07, Stefan Niantschur [EMAIL PROTECTED] wrote: Or at least send key parameters (gpg --list-keys output). pub 1024D/0476AD06 2007-11-27 [verfällt: 2008-11-26] uid Test User (Probebenutzer) [EMAIL PROTECTED] sub 2048g/879D6C41 2007-11-27 [verfällt: 2008-11-26] Elgamal 2048 works here,

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-03 Thread Marko Kreen
On 12/3/07, Stefan Niantschur [EMAIL PROTECTED] wrote: I finally made it. I created a brand-new key, reworked the query and voila. It seems that the GnuPG key has to be created with paramter --cipher-algo=blowfish before it can be used together with pgcrypto. The generated key with the

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-12-05 Thread Marko Kreen
On 11/29/07, Stefan Niantschur [EMAIL PROTECTED] wrote: SELECT pgp_pub_decrypt(dearmor(armor(pgp_pub_encrypt(armor(pgp_sym_encrypt('geheim'::text,'test'::text)),dearmor((SELECT ens_pubkey FROM ens_user WHERE ens_userid = 10112)::text,dearmor((SELECT ens_privkey FROM ens_user WHERE

Re: [GENERAL] accessing multiple databases using dblink

2007-12-13 Thread Marko Kreen
On 12/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Good morning to everybody, I've to resolve this situation: I've a collection of many different databases, all identical, and the name of those databases is stored inside a table in another central management database. In an ideal

Re: [GENERAL] Feature request: NOTIFY enhancement

2008-01-04 Thread Marko Kreen
On 1/3/08, Chris Browne [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Bruce Momjian) writes: I am not sure if I am asking too much but does it make sense, and is it possible, to enhance NOTIFY that process name/value pair? Like this: NOTIFY MyName=MyValue; With the capability of

Re: [GENERAL] Feature request: NOTIFY enhancement

2008-01-04 Thread Marko Kreen
On 1/4/08, CN [EMAIL PROTECTED] wrote: On Thu, 03 Jan 2008 14:20:41 -0500, Chris Browne [EMAIL PROTECTED] said: TODO already has: * Add optional textual message to NOTIFY This would allow an informational message to be added to the notify message, perhaps

Re: [GENERAL] How to safely compare transaction id?

2008-01-11 Thread Marko Kreen
On 1/11/08, alphax [EMAIL PROTECTED] wrote: I want to compare the record's transaction id in sql statements or PL/pgSQL stored procedure. Are there any system function or operator can safely(transaction id wraparound safed) compare the transaction id? In 8.3 there are txid functions that

Re: [GENERAL] How to safely compare transaction id?

2008-01-12 Thread Marko Kreen
On 1/12/08, alphax [EMAIL PROTECTED] wrote: Thanks. Actually, I want to compares the system columns(xmin, xmax, ctid) with the tid returned by txid functions declared in http://developer.postgresql.org/pgdocs/postgres/functions-info.html#FUNCTIONS-TXID-SNAPSHOT I want to determines a given

Re: [GENERAL] plpythonu

2008-01-18 Thread Marko Kreen
On 1/18/08, Erik Jones [EMAIL PROTECTED] wrote: On Jan 18, 2008, at 7:48 AM, Stuart Bishop wrote: plpython !=3D plpythonu. plpython was the 'secure' sandboxed version. The Python devs gave up supporting any sort of sandboxing feature in Python declaring it impossib= le. Someone

Re: [GENERAL] Postgresql + digital signature

2008-01-23 Thread Marko Kreen
On 1/23/08, Luis Alberto Pérez Paz [EMAIL PROTECTED] wrote: I'm working in a project which is using postgres (great database!, I love it) We're in a stage where I need to implement a mechanism to prevent the data modification. I'm thinking on 'Digital Signatures' (maybe RSA) in each row. If

Re: [GENERAL] Postgresql + digital signature

2008-01-23 Thread Marko Kreen
On 1/23/08, Luis Alberto Pérez Paz [EMAIL PROTECTED] wrote: Very interesting point of view. Yes, you're right about the manage key problem. The grant database access looks like a real solution. Eh, for some reason I imagined you have have some good reason why simple solutions are not

Re: [GENERAL] 8.3RC2 vs 8.2.6 testing results

2008-01-28 Thread Marko Kreen
On 1/29/08, Tom Lane [EMAIL PROTECTED] wrote: Vlad [EMAIL PROTECTED] writes: 2. We ran several tests and found 8.3 generally 10% slower than 8.2.6. The particular case you are showing here seems to be all about the speed of hash aggregation --- at least the time differential is mostly in the

Re: [GENERAL] partitioning using dblink

2008-02-29 Thread Marko Kreen
On 2/29/08, Scara Maccai [EMAIL PROTECTED] wrote: I can't get views to participate in the hierarchy... The partition exclusion _may_ work if you do something like: create view as select * from dblink/plproxy-from-part1 where part1 constraint union all select * from

Re: [GENERAL] partitioning using dblink

2008-02-29 Thread Marko Kreen
On 2/29/08, Scara Maccai [EMAIL PROTECTED] wrote: I'm sorry, I didn't understand you post... 1) Why does my current implementation is not working? Hierarchy doesn't work with views in general, not only with dblink Exactly, because inheritance/constraint exclusion wont work with views. 2)

Re: [GENERAL] partitioning using dblink

2008-02-29 Thread Marko Kreen
On 2/29/08, Scara Maccai [EMAIL PROTECTED] wrote: Exactly, because inheritance/constraint exclusion wont work with views. Ok, so there should be something written in the docs about it... From: the information about a view in the PostgreSQL system catalogs is exactly the same as it

Re: [GENERAL] Trigger to run @ connection time?

2008-03-13 Thread Marko Kreen
On 3/13/08, Dawid Kuroczko [EMAIL PROTECTED] wrote: On Tue, Mar 11, 2008 at 10:28 PM, Tom Lane [EMAIL PROTECTED] wrote: Kynn Jones [EMAIL PROTECTED] writes: If one can set up this insert operation so that it happens automatically whenever a new connection is made, I'd like to learn

Re: [GENERAL] Trigger to run @ connection time?

2008-03-14 Thread Marko Kreen
On 3/14/08, Dawid Kuroczko [EMAIL PROTECTED] wrote: On Thu, Mar 13, 2008 at 2:18 PM, Marko Kreen [EMAIL PROTECTED] wrote: On 3/13/08, Dawid Kuroczko [EMAIL PROTECTED] wrote: An application which uses tsearch2 ('SELECT set_curdict() / set_curcfg()' being called upon session start

Re: [GENERAL] Trigger to run @ connection time?

2008-03-14 Thread Marko Kreen
On 3/14/08, Erik Jones [EMAIL PROTECTED] wrote: On Mar 14, 2008, at 7:17 AM, Marko Kreen wrote: To put it to core Postgres, it needs to be conceptually sane first, without needing ugly workarounds to avoid it bringing whole db down. I can see ATM only few ways: - Applies

Re: [GENERAL] Using pgcrypto with AES-256 bits?

2005-05-02 Thread Marko Kreen
On 5/1/05, Stas Oskin [EMAIL PROTECTED] wrote: I tried the pgcrypto contrib module with the AES default encryption. It works pretty nice, but I understand that it's using 128 bit key strength. Is there any built-in support for the 256 bit key strength? Or it should be used via external

[GENERAL] Quick hack: permissions generator

2005-12-12 Thread Marko Kreen
I needed to re-set all permissions on a database as the database access philosophy changed. But as it had a lot of tables, I was losing overview very quick. The original permission script used m4 for SQL generation, but it didn't cut anymore. So I wrote a small Python script which read a

Re: [GENERAL] Quick hack: permissions generator

2005-12-13 Thread Marko Kreen
On Mon, Dec 12, 2005 at 09:36:27PM -0600, Jim C. Nasby wrote: On Mon, Dec 12, 2005 at 02:38:57PM +0200, Marko Kreen wrote: I needed to re-set all permissions on a database as the database access philosophy changed. But as it had a lot of tables, I was losing overview very quick

Re: [GENERAL] Why is create function bringing down the Backend server?

2005-12-22 Thread Marko Kreen
On 12/22/05, Carlos Moreno [EMAIL PROTECTED] wrote: The problem is, when I execute the SQL statement: create or replace function sha1 ; for the second time (i.e., after making modifications and recompiling), the *backend* crashes -- it then restarts automatically, and then I run again

Re: [GENERAL] Why is create function bringing down the Backend server?

2005-12-23 Thread Marko Kreen
On 12/23/05, Carlos Moreno [EMAIL PROTECTED] wrote: Marko Kreen wrote: On 12/22/05, Carlos Moreno [EMAIL PROTECTED] wrote: The problem is, when I execute the SQL statement: create or replace function sha1 ; for the second time (i.e., after making modifications and recompiling

Re: [GENERAL] Page-Level Encryption

2006-01-20 Thread Marko Kreen
On 1/21/06, Bricklen Anderson [EMAIL PROTECTED] wrote: Jim C. Nasby wrote: I would highly recommend taking a look at how Oracle is handling encryption in the database in 10.2 (or whatever they're calling it). They've done a good job of thinking out how to handle things like managing the

Re: [GENERAL] Page-Level Encryption

2006-01-20 Thread Marko Kreen
On 1/20/06, David Blewett [EMAIL PROTECTED] wrote: I'm not sure if this is the right list for this message; if it's not, let me know and I'll take it up elsewhere. I found this thread today: http://groups.google.com/group/comp.databases.postgresql.hackers/browse_thread/thread/4587283b3b3a5aec

Re: [GENERAL] xmin system column

2006-01-27 Thread Marko Kreen
On 1/26/06, Eric B. Ridge [EMAIL PROTECTED] wrote: Outside of VACUUM FREEZE, is there any way the xmin column in a relation can change, assuming of course the tuple is never updated again? I'm considering using this as a way to identify all tuples modified in the same transaction (in an

Re: [GENERAL] Postgres 8.1.2, Java, JDO, and case sensitivity woes

2006-01-28 Thread Marko Kreen
On 1/28/06, Matthew Hixson [EMAIL PROTECTED] wrote: So, it would seem that table names are case insensitive in select statements, but case sensitive in prepare statements. Can someone confirm or refute that? http://www.postgresql.org/docs/8.1/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

Re: [GENERAL] Oracle purchases Sleepycat - is this the other

2006-02-14 Thread Marko Kreen
On 2/14/06, Dan Sugalski [EMAIL PROTECTED] wrote: Zend isn't, last time I looked (which, granted, was ages ago), needed to run PHP, but it may be now. I guess you are thinking about Zend - PHP Optimizer not Zend - PHP Core. -- marko ---(end of

Re: [GENERAL] Fixing up a corrupted toast table

2006-03-09 Thread Marko Kreen
On 3/9/06, Tom Lane [EMAIL PROTECTED] wrote: Steve Atkins [EMAIL PROTECTED] writes: make it happy by inserting a dummy row into the toast table (chunk ID as specified in the error, chunk sequence 0, any old data value). Any attempt to touch the toast table gives me: ERROR: cannot change

Re: [GENERAL] Performance Killer 'IN' ?

2006-03-31 Thread Marko Kreen
On 3/31/06, Kai Hessing [EMAIL PROTECTED] wrote: The second one (UPDATE xyz WHERE id IN (xyz1, xyz2, ) AND status-1;) returns: -- Seq Scan on phon (cost=0.00..1573304.58 rows=105931 width=148) (actual time=369563.565..369563.565 rows=0 loops=1) Just a shot in the dark:

Re: [GENERAL] Performance Killer 'IN' ?

2006-04-03 Thread Marko Kreen
On 4/3/06, Kai Hessing [EMAIL PROTECTED] wrote: Marko Kreen wrote: Just a shot in the dark: does the plan stay the same, when you remove the ' AND status -1' ? No difference: I skipped the 'AND status -1' and have the following results... Ok. Thanks. I once had similar query

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Marko Kreen
On 5/9/06, Joe Kramer [EMAIL PROTECTED] wrote: Fedora core has OpenSSL 0.9.7 installed by default. And it's not possible to install 0.9.8 because of glibc conflict. I suspect pgcrypto looks for SHA256 in OpeSSL lib when it should use built-in. SHA256 is working fine on Windows but on Redhat it

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Marko Kreen
On 5/9/06, Joe Kramer [EMAIL PROTECTED] wrote: Thanks, but I need it to work out-of-the-box, with standard installation of RedHat or Gentoo and standard PostgreSQL rpm. I am developing application with PortgreSQL and I can't tell customer to Recompile PostgreSQL and see if it works then try to

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-09 Thread Marko Kreen
On 5/9/06, Joe Kramer [EMAIL PROTECTED] wrote: On 5/9/06, Marko Kreen [EMAIL PROTECTED] wrote: The fact that Fedora pgcrypto is linked with OpenSSL that does not support SHA256 is not a bug, just a fact. It's not Fedora only, same problem with Gentoo/portage. I think it's problem for all

Re: [GENERAL] pgcrypto sha256/384/512 don't work on Redhat. Please help!

2006-05-10 Thread Marko Kreen
On 5/10/06, Bruno Wolff III [EMAIL PROTECTED] wrote: On Tue, May 09, 2006 at 22:17:21 +0300, Joe Kramer [EMAIL PROTECTED] wrote: Right on! SHA2 should fallback the same as AES! Note that it's SHA256, not SHA2. It's SHA224/256/384/512, which together are more easily referred as SHA2.

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
On 6/11/09, Matt Amos zerebub...@gmail.com wrote: the openstreetmap project (http://osm.org/) recently moved from using mysql to postgres and we're trying to improve some of our tools using the new functionality that postgres provides. in particular, we are dumping changes to the database

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
On 6/11/09, Brett Henderson br...@bretth.com wrote: Marko Kreen wrote: 4-byte xids on btree may create data corruption. Can you be more specific on this? I'm aware of xid being an unsigned integer which means we need to deal with the cast resulting in negative numbers. This means we

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
On 6/11/09, Matt Amos zerebub...@gmail.com wrote: On Thu, Jun 11, 2009 at 1:13 PM, Brett Hendersonbr...@bretth.com wrote: See pgq.batch_event_sql() function in Skytools [2] for how to query txids between snapshots efficiently and without being affected by long transactions. I'll

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
On 6/11/09, Matt Amos zerebub...@gmail.com wrote: On Thu, Jun 11, 2009 at 2:48 PM, Marko Kreenmark...@gmail.com wrote: On 6/11/09, Matt Amos zerebub...@gmail.com wrote: On Thu, Jun 11, 2009 at 1:13 PM, Brett Hendersonbr...@bretth.com wrote: See pgq.batch_event_sql() function in

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Marko Kreen
On 7/16/09, Rafael Martinez r.m.guerr...@usit.uio.no wrote: Peter Eisentraut wrote: On Thursday 16 July 2009 12:14:48 Rafael Martinez wrote: ERROR: incompatible library /usr/local/lib/pg_uname_8.4.so: magic block mismatch DETAIL: Server has FLOAT8PASSBYVAL = true, library has false.

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Marko Kreen
On 7/16/09, Rafael Martinez r.m.guerr...@usit.uio.no wrote: Marko Kreen wrote: On 7/16/09, Rafael Martinez r.m.guerr...@usit.uio.no wrote: Peter Eisentraut wrote: You need to recompile your module. We recompile the module automatically when a new postgres cluster gets

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-20 Thread Marko Kreen
On Mon, Jun 20, 2011 at 5:08 AM, Amitabh Kant amitabhk...@gmail.com wrote: On Mon, Jun 20, 2011 at 1:43 AM, Alexander Farber alexander.far...@gmail.com wrote: Hello Cedric and others, On Sun, Jun 19, 2011 at 9:56 PM, Cédric Villemain cedric.villemain.deb...@gmail.com wrote: 2011/6/19

Re: [GENERAL] PostgreSQL 8.4.8 bringing my website down every evening

2011-06-20 Thread Marko Kreen
On Mon, Jun 20, 2011 at 9:36 AM, Alexander Farber alexander.far...@gmail.com wrote: I've added  $db-beginTransaction();    $db-commit(); around _all_ statements, but now get: I don't think that was a good idea.  SQLSTATE[25P02]: In failed sql transaction:  7 ERROR: current  

Re: [GENERAL] UTF-8 for bytea

2011-11-03 Thread Marko Kreen
On Thu, Nov 3, 2011 at 4:34 AM, Robert James srobertja...@gmail.com wrote: When trying to INSERT on Postgres (9.1) to a bytea column, via E'' escaped strings, I get the strings rejected because they're not UTF8. I'm confused, since bytea isn't for strings but for binary.  What causes this? How

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Marko Kreen
On Sun, Nov 20, 2011 at 8:32 AM, Phoenix Kiula phoenix.ki...@gmail.com wrote: The password I am entering in the terminal is right for sure. I've tried it a few times, checked the caps lock, etc. Also, if the log carries this FATAL password authentication failed, why does the terminal give the

Re: [GENERAL] segfault with plproxy

2011-12-19 Thread Marko Kreen
On Sat, Dec 17, 2011 at 10:25:40PM +0100, Filip Rembiałkowski wrote: Following scrip causes segmentation fault. Any ideas why / how to diagnose? create table part0.users( check(id%2=0) ) inherits (public.users); create table part1.users( check(id%2=1) ) inherits (public.users); create or

Re: [GENERAL] segfault with plproxy

2011-12-20 Thread Marko Kreen
On Mon, Dec 19, 2011 at 01:05:20PM +0100, Filip Rembiałkowski wrote: W dniu 19 grudnia 2011 10:39 użytkownik Marko Kreen mark...@gmail.com napisał: On Sat, Dec 17, 2011 at 10:25:40PM +0100, Filip Rembiałkowski wrote: Following scrip causes segmentation fault. Any ideas why / how to diagnose

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Marko Kreen
On Fri, Jan 6, 2012 at 11:24 PM, Steve Crawford scrawf...@pinpointresearch.com wrote: On 01/06/2012 01:11 PM, Phoenix Kiula wrote: On Fri, Jan 6, 2012 at 11:46 AM, Tom Lanet...@sss.pgh.pa.us  wrote: Phoenix Kiulaphoenix.ki...@gmail.com  writes: Hi. I'm using Postgresql 9.0.5, and the

Re: [GENERAL] Lock/deadlock issues with priority queue in Postgres - possible VACUUM conflicts

2012-01-30 Thread Marko Kreen
On Mon, Jan 9, 2012 at 5:58 AM, Chris Angelico ros...@gmail.com wrote: http://wiki.postgresql.org/wiki/PGQ_Tutorial PGQ looks promising, but I can't afford the risk of losing calls in the event that there are no workers to process them (the correct action is for them simply to languish in the

Re: [GENERAL] Lock/deadlock issues with priority queue in Postgres - possible VACUUM conflicts

2012-01-30 Thread Marko Kreen
On Tue, Jan 31, 2012 at 08:17:57AM +1100, Chris Angelico wrote: On Tue, Jan 31, 2012 at 4:12 AM, Marko Kreen mark...@gmail.com wrote: On Mon, Jan 9, 2012 at 5:58 AM, Chris Angelico ros...@gmail.com wrote: http://wiki.postgresql.org/wiki/PGQ_Tutorial PGQ looks promising, but I can't afford

Re: [GENERAL] Anonymized database dumps

2012-03-19 Thread Marko Kreen
On Mon, Mar 19, 2012 at 10:12:01AM +0100, hari.fu...@gmail.com wrote: Janning Vygen vy...@kicktipp.de writes: pgcrypto does not work for this scenario as far as i know. pgcrypto enables me to encrypt my data and let only a user with the right password (or key or whatever) decrypt it,

Re: [GENERAL] Use LISTEN/NOTIFY between different databases

2012-05-09 Thread Marko Kreen
On Mon, May 7, 2012 at 11:52 PM, John R Pierce pie...@hogranch.com wrote: 2012/5/7 John R Pierce pie...@hogranch.com mailto:pie...@hogranch.com    On 05/07/12 1:13 PM, Igor wrote: I understand this. But I need link between two clients, connected to different databases. Its real situation. We

Re: [GENERAL] how _not_ to log?

2013-07-27 Thread Marko Kreen
On Fri, Jul 26, 2013 at 2:54 AM, Adrian Klaver adrian.kla...@gmail.com wrote: http://www.postgresql.org/docs/9.2/interactive/sql-alterrole.html Caution must be exercised when specifying an unencrypted password with this command. The password will be transmitted to the server in cleartext, and

Re: [GENERAL] Monitoring number of backends

2013-10-23 Thread Marko Kreen
On Tue, Oct 22, 2013 at 09:45:24PM -0500, Andy Colson wrote: On 10/22/2013 12:59 PM, Stephen Frost wrote: Andy, * andy (a...@squeakycode.net) wrote: My website is about to get a little more popular. I'm trying to add in some measurements to determine an upper limit of how many concurrent

Re: [GENERAL] Absolute value of intervals

2009-10-30 Thread Marko Kreen
On 10/30/09, Tom Lane t...@sss.pgh.pa.us wrote: Jeff Davis pg...@j-davis.com writes: Yes, that is a strange case. When you can't tell if an interval is positive or negative, how do you define the absolute value? That was the point of my '1 day -25 hours' example. Whether you consider

Re: [GENERAL] Absolute value of intervals

2009-10-30 Thread Marko Kreen
On 10/30/09, Sam Mason s...@samason.me.uk wrote: On Fri, Oct 30, 2009 at 01:45:24PM +0200, Marko Kreen wrote: On 10/30/09, Tom Lane t...@sss.pgh.pa.us wrote: That was the point of my '1 day -25 hours' example. Whether you consider that positive or negative seems mighty arbitrary

Re: [GENERAL] pgp encryption functions

2009-11-09 Thread Marko Kreen
On 11/7/09, Christian Petzold c.petz...@gmx.net wrote: I'm trying to use the pgp_pub_encrypt and pgp_pub_decrypt_bytea functions to store some data in my db. This is how I encrypt: INSERT INTO Test( test) VALUES (pgp_pub_encrypt('test', dearmor('-BEGIN PGP PUBLIC KEY

Re: [GENERAL] Problem with encode () and hmac() in pgcrypto

2011-02-01 Thread Marko Kreen
On Tue, Feb 1, 2011 at 5:36 PM, hlcborg h.luis.card...@gmail.com wrote: encode(hmac(v_em_crt_conc, v_Private,'sha1'),'base64'); HMAC - key-dependant SHA1 The Result: h6CpmrP1QCE/Mp3xn3utUEPtftg=      This hash has 28 chars When I use OpenSSL in command line like this: ~$ echo

Re: [GENERAL] Problem with encode () and hmac() in pgcrypto

2011-02-02 Thread Marko Kreen
On Wed, Feb 2, 2011 at 1:19 AM, hlcborg h.luis.card...@gmail.com wrote: These two operations are not equivalent. But... Can I have this operation done in the Stored Procedure inside the Database? Plain SHA1, which is signed with RSA signature. and in the end encoded to base64? I was

Re: [GENERAL] Problem with encode () and hmac() in pgcrypto

2011-02-03 Thread Marko Kreen
On Thu, Feb 3, 2011 at 2:38 PM, hlcborg h.luis.card...@gmail.com wrote: For now, I already can use in my PG database the PL/Python to create functions. But I need a library that  can do the: Plain SHA1, which is signed with RSA signature. Do you known any PL/Python wrapper libraries around

Re: [GENERAL] finding bogus UTF-8

2011-02-15 Thread Marko Kreen
On Thu, Feb 10, 2011 at 9:02 PM, Scott Ribe scott_r...@elevated-dev.com wrote: I know that I have at least one instance of a varchar that is not valid UTF-8, imported from a source with errors (AMA CPT files, actually) before PG's checking was as stringent as it is today. Can anybody suggest

Re: [GENERAL] [Plproxy-users] A complex plproxy query

2009-01-22 Thread Marko Kreen
On 1/22/09, Igor Katson descent...@gmail.com wrote: Hannu Krosing wrote: On Thu, 2009-01-22 at 02:33 +0300, Igor Katson wrote: So to say, give me the list of friends (not only their ID's, but all the needed columns!) of given individual, which are in a given group. That seems ok

Re: [GENERAL] Feature request dblink: Security issue - dblink user+password parameters must be optional

2009-01-28 Thread Marko Kreen
On 1/28/09, Hermann Muster hermann.mus...@gmx.de wrote: When creating a view via DBLINK, the user=... and password=... parameters shall be optional. If they are left out, then the current user accessing the view shall be impersonated implicitely to the dblinked database as well. Forcing

Re: [GENERAL] [Plproxy-users] Two-phase commmit, plpgsql and plproxy

2009-02-18 Thread Marko Kreen
On 2/11/09, Igor Katson descent...@gmail.com wrote: I would like to call several plproxy functions one after another (which will call plpgsql functions in different target partitions), and in case one of them fails, i want to roll back changes in every one. That is exactly how

Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

2012-10-08 Thread Marko Kreen
On Tue, Oct 2, 2012 at 12:27 PM, Phoenix Kiula phoenix.ki...@gmail.com wrote: I get this error: psql: ERROR: No such user: MYSITE_MYSITE And yet, the authfile has this: MYSITE_MYSITE md5 of raw password MYSITE_MYSITE raw password postgres md5 of string

Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

2012-10-08 Thread Marko Kreen
On Sat, Oct 6, 2012 at 5:24 AM, Adrian Klaver adrian.kla...@gmail.com wrote: One thing I see above: http://pgbouncer.projects.postgresql.org/doc/config.html \* acts as fallback database Notice the backslash. The backslash is asciidoc/docbook accident, it should be plain * there. -- marko

Re: [GENERAL] Comparing txid_current() to xmin

2012-11-08 Thread Marko Kreen
On Wed, Nov 7, 2012 at 10:21 AM, Andres Freund and...@anarazel.de wrote: On Tue, Nov 06, 2012 at 02:55:40PM -0800, Mike Lewis wrote: I am trying to make a trigger that updates a row once and only once per transaction (even if this trigger gets fired multiple times). The general idea is that

  1   2   >