Re: [GENERAL] libpq - lack of support to set the fetch size

2014-03-12 Thread Marko Kreen
On Wed, Mar 12, 2014 at 10:57:03AM +, matshyeq wrote: > On Wed, Mar 12, 2014 at 9:30 AM, Marko Kreen wrote: > > This option would not make sense as you are not "fetching" anything, > > full resultset is being streamed from server over TCP connection. > > We

Re: [GENERAL] libpq - lack of support to set the fetch size

2014-03-12 Thread Marko Kreen
On Tue, Mar 11, 2014 at 12:39:12PM +, matshyeq wrote: > - when using PQsetSingleRowMode() function - does it give an option to > define how many rows to cache on client's side (like JDBC setFetchSize() > does) or leaves it at pqlib's discretion? This option would not make sense as you are not

Re: [GENERAL] libpq - lack of support to set the fetch size

2014-03-10 Thread Marko Kreen
On Mon, Mar 10, 2014 at 06:58:26AM +, Albe Laurenz wrote: > Daniel Verite wrote: > > matshyeq wrote: > > [ runs out of memory on the client because all results from a large query are > retrieved at once ] > > >> "Unfortunately, this is a limitation in the underlying driver (libpq) > >> rath

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

Re: [GENERAL] how _not_ to log?

2013-07-27 Thread Marko Kreen
On Fri, Jul 26, 2013 at 2:54 AM, Adrian Klaver 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 it might also be l

Re: [GENERAL] don't i need a -modules package for londiste3?

2013-04-29 Thread Marko Kreen
On Mon, Apr 29, 2013 at 12:25:15PM +0200, Willy-Bas Loos wrote: > I want to upgrade from londiste2 to londiste3. > Skytools 2 has a -modules- package. > We're using postgres 8.4 at the moment, so we use the package > skytools-modules-8.4. > > Now i'm looking at londiste3 in Debian experimental, bu

Re: [GENERAL] in C trigger function find out if column is part of primary key

2013-04-01 Thread Marko Kreen
On Mon, Apr 01, 2013 at 12:06:25AM +0200, Enke, Dr., Michael wrote: > I have to find out if a column ( i = 0, ..., tupdesc->natts-1 ) is part of a > primary key > but for performance reasons I do not want to execute another query via SPI. > Is this possible? Simpler and probably even faster appro

Re: [GENERAL] Plproxy with returns table() make PG segfault

2012-11-17 Thread Marko Kreen
On Fri, Nov 16, 2012 at 11:09 AM, Sébastien Lardière wrote: > On 11/15/2012 08:40 PM, Cédric Villemain wrote: >> top post: this looks like a plproxy bug (no ?), I've added Marko in CC. > > Yes, it is, i think … Thanks, fixed in git. Fix will be in 2.5 release. -- marko -- Sent via pgsql-gen

Re: [GENERAL] Comparing txid_current() to xmin

2012-11-08 Thread Marko Kreen
On Wed, Nov 7, 2012 at 10:21 AM, Andres Freund 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 for a user we

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 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 -- Sent via p

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 wrote: > I get this error: > >psql: ERROR: No such user: MYSITE_MYSITE > > And yet, the authfile has this: > > "MYSITE_MYSITE" "" > "MYSITE_MYSITE" "" > "postgres" "" > "MYSITE_pgbouncer" "" Because of data sanitizing I cannot se

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 wrote: >> 2012/5/7 John R Pierce 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 use sharded cluster bas

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 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, right? So if

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 wrote: > > On Mon, Jan 9, 2012 at 5:58 AM, Chris Angelico wrote: > >> http://wiki.postgresql.org/wiki/PGQ_Tutorial > >> > >> PGQ looks promising, b

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 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 database un

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

2012-01-06 Thread Marko Kreen
On Fri, Jan 6, 2012 at 11:24 PM, Steve Crawford wrote: > On 01/06/2012 01:11 PM, Phoenix Kiula wrote: >> >> On Fri, Jan 6, 2012 at 11:46 AM, Tom Lane  wrote: >>> >>> Phoenix Kiula  writes: Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. >>> >>> Perhaps pgbo

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 > napisał: > > On Sat, Dec 17, 2011 at 10:25:40PM +0100, Filip Rembiałkowski wrote: > >> Following scrip causes segmentation fault. Any ideas

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 r

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Marko Kreen
On Sun, Nov 20, 2011 at 8:32 AM, Phoenix Kiula 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 vague error "no wo

Re: [GENERAL] UTF-8 for bytea

2011-11-03 Thread Marko Kreen
On Thu, Nov 3, 2011 at 4:34 AM, Robert James 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 do I fix this? (I

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 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   transaction is aborted,

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 wrote: > On Mon, Jun 20, 2011 at 1:43 AM, Alexander Farber > wrote: >> >> Hello Cedric and others, >> >> On Sun, Jun 19, 2011 at 9:56 PM, Cédric Villemain >> wrote: >> > 2011/6/19 Alexander Farber : >> >> [pgbouncer] >> >> logfile = /var/log/pgbounce

Re: [GENERAL] finding bogus UTF-8

2011-02-15 Thread Marko Kreen
On Thu, Feb 10, 2011 at 9:02 PM, Scott Ribe 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 a query to > find such v

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 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 OpenSSL (or any o

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 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 looking in the pgcrypt

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 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 "2011-01-31;2011-02-01T13:33

Re: [GENERAL] pgp encryption functions

2009-11-09 Thread Marko Kreen
On 11/7/09, Christian Petzold 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 > BLOCK

Re: [GENERAL] Absolute value of intervals

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

Re: [GENERAL] Absolute value of intervals

2009-10-30 Thread Marko Kreen
On 10/30/09, Tom Lane wrote: > Jeff Davis 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 that positive or negative see

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

2009-07-16 Thread Marko Kreen
On 7/16/09, Rafael Martinez wrote: > Marko Kreen wrote: > > On 7/16/09, Rafael Martinez wrote: > >> Peter Eisentraut wrote: > >> > > > >> > You need to recompile your module. > >> > >> We recompile the module automatically wh

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

2009-07-16 Thread Marko Kreen
On 7/16/09, Rafael Martinez 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] queries on xmin

2009-06-11 Thread Marko Kreen
On 6/11/09, Matt Amos wrote: > On Thu, Jun 11, 2009 at 2:48 PM, Marko Kreen wrote: > > On 6/11/09, Matt Amos wrote: > >> On Thu, Jun 11, 2009 at 1:13 PM, Brett Henderson wrote: > >> >> See pgq.batch_event_sql() function in Skytools [2] for how to >

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
On 6/11/09, Matt Amos wrote: > On Thu, Jun 11, 2009 at 1:13 PM, Brett Henderson 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 take a look. > > it was l

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
On 6/11/09, Brett Henderson 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 nega

Re: [GENERAL] queries on xmin

2009-06-11 Thread Marko Kreen
On 6/11/09, Matt Amos 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 at short > inte

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

2009-02-18 Thread Marko Kreen
On 2/11/09, Igor Katson 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 two-phase-commit (2PC) shoul

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 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 anybody to hardcode a

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

2009-01-22 Thread Marko Kreen
On 1/22/09, Igor Katson 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 with

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. > >

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() /

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

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 sa

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.

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 dblink/plproxy-from-p

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 most

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 eno

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

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.

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

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 e

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 > > >

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 t

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 i

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 > e

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-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 wo

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 of

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 wonder

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

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. Ind

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 > >> j

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 > tha

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 trie

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,

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] 2

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. Asyncro

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 e

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: [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 f

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 fro

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 "passwo

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] 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

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

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] 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 fol

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

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: > > ERRO

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 broadcast)

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-IDENTIFIER

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

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: >

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 > > mana

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

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 r

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 > >

[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 .ini-s

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] 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 broadcast)

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... -- m

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 p

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

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 li

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 U

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] Encoding passwords

2001-09-25 Thread Marko Kreen
On Tue, Sep 25, 2001 at 08:42:04AM -0400, Mike Arace wrote: > > Is there a function out there for pg which allows you to generate a random > number given a seed value? I'm trying to create a users table which would > require the storage of a password in a database field, and I'm hesitant to >

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() from digest(field, 'md5') If you want in hex: encode(digest(field, 'md5'), 'hex') Look into contrib/pgcrypto in PostgreSQL source. -- marko --

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 b

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 > > > fa

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

  1   2   >