Re: [GENERAL] ID column naming convention

2015-10-14 Thread Karsten Hilbert
On Tue, Oct 13, 2015 at 03:44:15PM -0700, John R Pierce wrote: > On 10/13/2015 3:27 PM, droberts wrote: > >Thanks. My only question is how do you create a schema diagram (ERD) then? > >The tool won't know what the relationships are unless maybe you put foreign > >key constraints on. BTW does an

Re: [GENERAL] Understanding "seq scans"

2015-10-14 Thread Merlin Moncure
On Tue, Oct 13, 2015 at 11:54 AM, Alvaro Herrera wrote: > Lele Gaifax wrote: >> Alvaro Herrera writes: >> >> > So 10% of your rows in the master_l10n table start with "quattro"? >> > That's pretty odd, isn't it? How did you manufacture these data? >> >> Well, not a real scenario for sure, but de

[GENERAL] problems with copy from file

2015-10-14 Thread Andreas Kretschmer
hello @ll, i have a simpe table : test=# create table httpd_log(id serial primary key, data text); CREATE TABLE and i'm trying to import from a httpd-log, that contains this: kretschmer@tux:~$ cat test.log ... domain.de aaa.63.xx.yy - - [06/Nov/2014:00:48:22 +0100] "GET /index.php/impressum2/

[GENERAL] postgres function

2015-10-14 Thread Ramesh T
Hi All, Do we have function like regexp_substr in postgres..? in oracle this function seach the - from 1 to 2 and return result, regexp_substr(PART_CATG_DESC,'[^-]+', 1, 2)

Re: [GENERAL] using postgresql for session

2015-10-14 Thread Jonathan Vanasco
On Oct 7, 2015, at 11:58 AM, john.tiger wrote: > has anyone used postgres jsonb for holding session ? Since server side > session is really just a piece of data, why bother with special "session" > plugins and just use postgres to hold the data and retrieve it with psycopg2 > ? Maybe use som

Re: [GENERAL] postgres function

2015-10-14 Thread David G. Johnston
On Wed, Oct 14, 2015 at 9:38 AM, Ramesh T wrote: > Hi All, > Do we have function like regexp_substr in postgres..? > > in oracle this function seach the - from 1 to 2 and return result, > regexp_substr(PART_CATG_DESC,'[^-]+', 1, 2) > ​Maybe one of the functions on this page will get

Re: [GENERAL] *** QUESTION *** After successful 'BEGIN;' command -- why PGSQL_TRANSACTION_ACTIVE and not PGSQL_TRANSACTION_INTRANS?

2015-10-14 Thread Gavin Flower
On 12/10/15 22:52, Steve Petrie, P.Eng. wrote: [...] BTW -- this PostgreSQL newbie (bye bye mysql) is getting a nice warm fuzzy feeling, about PostgreSQL and its amazingly helpful community :) [...] I can attempt to remedy your 'nice warm fuzzy feeling'! :-) More seriously: (1) why did you

[GENERAL] Not storing MD5 hashed passwords

2015-10-14 Thread Quiroga, Damian
Hi, In case someone knows... Does postgres support other (stronger) hashing algorithms than MD5 to store the database passwords at disk? If not, is there any plan to move away from MD5? Thanks, Damian

Re: [GENERAL] Not storing MD5 hashed passwords

2015-10-14 Thread John R Pierce
On 10/14/2015 1:31 PM, Quiroga, Damian wrote: Does postgres support other (stronger) hashing algorithms than MD5 to store the database passwords at disk? If not, is there any plan to move away from MD5? if you can read the password database, you already have superuser access to the full d

[GENERAL] BDR: pg_stat_bdr: cache lookup failed

2015-10-14 Thread Selim Tuvi
Hi we are currently testing BDR 0.9.2 and I set up a two node cluster. From one node I can run: select * from bdr.pg_stat_bdr and it gives me the rows fine but on the other node I get the following error: ERROR: cache lookup failed for replication identifier id: 4 Any idea why? The server lo

Re: [GENERAL] Not storing MD5 hashed passwords

2015-10-14 Thread Joshua D. Drake
On 10/14/2015 01:31 PM, Quiroga, Damian wrote: Hi, In case someone knows… Does postgres support other (stronger) hashing algorithms than MD5 to store the database passwords at disk? No. If not, is there any plan to move away from MD5? Not currently although it has been mentioned. However

Re: [GENERAL] Not storing MD5 hashed passwords

2015-10-14 Thread Jeff Janes
On Wed, Oct 14, 2015 at 1:41 PM, John R Pierce wrote: > On 10/14/2015 1:31 PM, Quiroga, Damian wrote: > > > > Does postgres support other (stronger) hashing algorithms than MD5 to > store the database passwords at disk? > > If not, is there any plan to move away from MD5? > > There are proposals

Re: [GENERAL] Not storing MD5 hashed passwords

2015-10-14 Thread Quiroga, Damian
Excellent answers. Thanks everyone. From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jeff Janes Sent: Wednesday, October 14, 2015 7:19 PM To: John R Pierce Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Not storing MD5 hashed passwords On

Re: [GENERAL] Not storing MD5 hashed passwords

2015-10-14 Thread Michael Paquier
On Thu, Oct 15, 2015 at 7:19 AM, Jeff Janes wrote: > On Wed, Oct 14, 2015 at 1:41 PM, John R Pierce wrote: >> >> On 10/14/2015 1:31 PM, Quiroga, Damian wrote: >> >> >> >> Does postgres support other (stronger) hashing algorithms than MD5 to >> store the database passwords at disk? >> >> If not, i

Re: [GENERAL] using postgresql for session

2015-10-14 Thread Tiger Nassau
maybe we will just use beaker with our bottle framework - thought it was duplicative to have redis since we have postgres and lookup speed should be  trivial since session only has a couple of small fields like account id and role Sent from Type Mail On Oct 14, 2015, 12:16, at 12:16, Jonathan

Re: [GENERAL] Not storing MD5 hashed passwords

2015-10-14 Thread Jeff Janes
On Wed, Oct 14, 2015 at 5:49 PM, Michael Paquier wrote: > On Thu, Oct 15, 2015 at 7:19 AM, Jeff Janes wrote: > > On Wed, Oct 14, 2015 at 1:41 PM, John R Pierce > wrote: > >> > >> On 10/14/2015 1:31 PM, Quiroga, Damian wrote: > >> > >> > >> > >> Does postgres support other (stronger) hashing alg

[GENERAL] How to get the session user in a C user defined function

2015-10-14 Thread John Leiseboer
I would like to get the session_user into a C char[] in a C language UDF. I have found what appears to be a function returning a Datum type called session_user, but I'm having trouble working out how to call it from within my C function. Can anyone provide some advice on how to do this? John Em

Re: [GENERAL] How to get the session user in a C user defined function

2015-10-14 Thread Michael Paquier
On Thu, Oct 15, 2015 at 2:38 PM, John Leiseboer wrote: > I would like to get the session_user into a C char[] in a C language UDF. I > have found what appears to be a function returning a Datum type called > session_user, but I'm having trouble working out how to call it from within > my C func

Re: [GENERAL] Understanding "seq scans"

2015-10-14 Thread Lele Gaifax
Merlin Moncure writes: > On Tue, Oct 13, 2015 at 11:54 AM, Alvaro Herrera > wrote: >> Be very careful with a % at the left. The index is not going to work at >> all there. It is not the same as looking for stuff without a % at the >> left. > > Note, you can optimize LIKE '%foo%' with pg_trgm/