Re: [GENERAL] Finding matching words in a word game

2013-03-06 Thread Misa Simic
Hi, I think you can make another table: Word, letter, count (word, letter - pk) In good_words add column sorted_letters. Now we can make a view based on that two tables: Word, letter, count, sorted_letters Now we need two immutable functions: 1. For given word returns sorted_letters word

Re: [GENERAL] PostgreSQL connect with Visual C++

2013-03-06 Thread Albe Laurenz
dhaval257 wrote: I am new to postgres. I am doing Project on Image processing in OpenCV(IDE i am using is Visual C++ 2010). I have downloaded PostgreSQL 8.4 and installed it successfully. I want to know how to connect postgres with visual C++. Use something more recent than 8.4 if you can.

[GENERAL] Security review

2013-03-06 Thread Atri Sharma
Hi all, A couple of folks in my college are doing a review of security features in various databases present today. Specifically, how these features measure up against each other. Can anyone please give me a few pointers on the features we have that MySQL doesnt? Thanks, Atri -- Regards,

Re: [GENERAL] PostgreSQL connect with Visual C++

2013-03-06 Thread John R Pierce
On 3/4/2013 8:17 PM, dhaval257 wrote: I am new to postgres. I am doing Project on Image processing in OpenCV(IDE i am using is Visual C++ 2010). I have downloaded PostgreSQL 8.4 and installed it successfully. I want to know how to connect postgres with visual C++. is this app using the .net

Re: [GENERAL] PostgreSQL connect with Visual C++

2013-03-06 Thread Christian Ullrich
* dhaval257 wrote: No It is not using .NET framework. I tried with libpq but ended up with error that Application can not run because SSLEAY32.dll is missing (something like this). So I left that thing. Have you used libpq? ssleay32.dll is part of the PostgreSQL distribution, and is installed

Re: [GENERAL] Why does slony use a cursor? Anyone know?

2013-03-06 Thread Glyn Astill
From: Shaun Thomas stho...@optionshouse.com To: PostgreSQL General pgsql-general@postgresql.org Cc: Sent: Tuesday, 5 March 2013, 14:51 Subject: [GENERAL] Why does slony use a cursor? Anyone know? Hey everyone, Frankly, I'm shocked at what I just found. We did a delete last night of

[GENERAL] Change owner for all tables in a database in one batch

2013-03-06 Thread Alexander Farber
Hello, by accident I have wrong owner for all tables in my 8.4.13 database: bukvy= select * from pg_tables where tableowner = 'skat'; schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers

Re: [GENERAL] Change owner for all tables in a database in one batch

2013-03-06 Thread Alvaro Herrera
Alexander Farber escribió: Is there maybe a one-liner for changing the ownership in 1 batch or should I execute alter table set owner to bukvy one by one? The command REASSIGN OWNED changes ownership of all objects owned by a certain role. There's no way to restrict it to just tables,

Re: [GENERAL] Finding matching words in a word game

2013-03-06 Thread Chris Angelico
On Tue, Mar 5, 2013 at 8:29 PM, Alexander Farber alexander.far...@gmail.com wrote: is there maybe a clever way of finding all possible words from a given set of letters by means of PostgreSQL (i.e. inside the database vs. scanning all database rows by a PHP script, which would take too long) -

Re: [GENERAL] Finding matching words in a word game

2013-03-06 Thread Alexander Farber
Thanks, will try that (the dumb approach) too :-) Still working on my dictionary (will be auto-generated by a script). On Wed, Mar 6, 2013 at 2:57 PM, Chris Angelico ros...@gmail.com wrote: words = {} for word in dictionary: # provide a dictionary somehow - maybe from a file/db

Re: [HACKERS] [GENERAL] Floating point error

2013-03-06 Thread Florian Weimer
On 03/05/2013 07:23 PM, Tom Lane wrote: Maciek Sakrejda m.sakre...@gmail.com writes: Thank you: I think this is what I was missing, and what wasn't clear from the proposed doc patch. But then how can pg_dump assume that it's always safe to set extra_float_digits = 3? It's been proven (don't

Re: [GENERAL] Why does slony use a cursor? Anyone know?

2013-03-06 Thread Shaun Thomas
On 03/06/2013 04:49 AM, Glyn Astill wrote: What version of slony are you on? The specifics of what you mention don't sound quite right, but it sounds very much like bug 167 which was fixed in 2.1.2 if I remember correctly. We're on 2.1.2. Presumably, anyway. I didn't encounter the problem in

Re: [GENERAL] Security review

2013-03-06 Thread Zenny
Maybe this link answers your query: http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL On 3/6/13, Atri Sharma atri.j...@gmail.com wrote: Hi all, A couple of folks in my college are doing a review of security features in various databases present today. Specifically, how these features measure

[GENERAL] FW: statement failure

2013-03-06 Thread Little, Douglas
Hi, I have a dev and prod Greenplum system (4.2.2.4) that is based on PG 8.2.15 I have a function that's been working fine on dev, but when implemented in prod had a syntax error. I was easily able to fix by casting, but I can't see why the message didn't show up on our dev machine. I've

Re: [GENERAL] FW: statement failure

2013-03-06 Thread Merlin Moncure
On Wed, Mar 6, 2013 at 9:38 AM, Little, Douglas douglas.lit...@orbitz.comwrote: Hi, ** ** I have a dev and prod Greenplum system (4.2.2.4) that is based on PG 8.2.15 I have a function that’s been working fine on dev, but when implemented in prod had a syntax error. I was

Re: [GENERAL] WAL_DEBUG

2013-03-06 Thread Jeff Janes
On Wed, Mar 6, 2013 at 1:31 PM, ning chan ninchan8...@gmail.com wrote: Hi, Does anyone know how to enable WAL_DEBUG? I download postgresql 9.2.3 src code and compile it as follow: modify ./src/include/pg_config_manual.h /* * Enable debugging print statements for WAL-related operations;

Re: [GENERAL] Why does slony use a cursor? Anyone know?

2013-03-06 Thread Dean Rasheed
On 6 March 2013 14:35, Shaun Thomas stho...@optionshouse.com wrote: On 03/06/2013 04:49 AM, Glyn Astill wrote: What version of slony are you on? The specifics of what you mention don't sound quite right, but it sounds very much like bug 167 which was fixed in 2.1.2 if I remember correctly.

[GENERAL] ERROR: syntax error at or near :

2013-03-06 Thread Graham Leggett
Hi all, I have a text file, and I need to update the value of an element in a table with the contents of this text file. Following the instructions at http://stackoverflow.com/questions/10968039/postgresql-inserting-value-of-a-column-from-a-file I tried this, but get the error below, which I

Re: [GENERAL] ERROR: syntax error at or near :

2013-03-06 Thread Greg Williamson
Graham -- From: Graham Leggett minf...@sharp.fm To: pgsql-general@postgresql.org pgsql-general@postgresql.org Sent: Wednesday, March 6, 2013 2:41 PM Subject: [GENERAL] ERROR:  syntax error at or near : Hi all, I have a text file, and I need to update the

Re: [GENERAL] ERROR: syntax error at or near :

2013-03-06 Thread Ian Lawrence Barwick
2013/3/7 Graham Leggett minf...@sharp.fm: Hi all, I have a text file, and I need to update the value of an element in a table with the contents of this text file. Following the instructions at http://stackoverflow.com/questions/10968039/postgresql-inserting-value-of-a-column-from-a-file I

Re: [GENERAL] ERROR: syntax error at or near :

2013-03-06 Thread Adrian Klaver
On 03/06/2013 02:41 PM, Graham Leggett wrote: Hi all, I have a text file, and I need to update the value of an element in a table with the contents of this text file. Following the instructions at http://stackoverflow.com/questions/10968039/postgresql-inserting-value-of-a-column-from-a-file

Re: [GENERAL] ERROR: syntax error at or near :

2013-03-06 Thread Ian Lawrence Barwick
Greg, 2013/3/7 Greg Williamson gwilliamso...@yahoo.com: Graham -- (...) The colon (:) is not needed, just remove it. A pair of colons is used to indicate a cast of a value; off hand I am not coming up with any use of a colon in basic SQL. This is psql-specific syntax; the colon should

Re: [GENERAL] WAL_DEBUG

2013-03-06 Thread Jeff Janes
On Wed, Mar 6, 2013 at 2:38 PM, ning chan ninchan8...@gmail.com wrote: Hi Jeff, Thanks for your reply. this is the error message i got: -bash-4.1$ pg_ctl start server starting -bash-4.1$ LOG: unrecognized configuration parameter wal_debug in file /usr/local/pgsql/data/postgresql.conf

Re: [GENERAL] ERROR: syntax error at or near :

2013-03-06 Thread Adrian Klaver
On 03/06/2013 03:04 PM, Greg Williamson wrote: Graham -- From: Graham Leggett minf...@sharp.fm To: pgsql-general@postgresql.org pgsql-general@postgresql.org Sent: Wednesday, March 6, 2013 2:41 PM Subject: [GENERAL] ERROR: syntax error at or near : Hi all,

Re: [GENERAL] ERROR: syntax error at or near :

2013-03-06 Thread Graham Leggett
On 07 Mar 2013, at 1:05 AM, Ian Lawrence Barwick barw...@gmail.com wrote: Can anyone explain what might be going wrong, and what I should do instead? patricia=# \set content `cat /tmp/certificates.txt` patricia=# update property set value = :'content' where key =

Re: [GENERAL] ERROR: syntax error at or near :

2013-03-06 Thread Greg Williamson
Thanks for the link / explanation -- hadn't seen this use before. GW - Original Message - From: Adrian Klaver adrian.kla...@gmail.com To: Greg Williamson gwilliamso...@yahoo.com Cc: pgsql-general@postgresql.org pgsql-general@postgresql.org Sent: Wednesday, March 6, 2013 3:13 PM

Re: [GENERAL] ERROR: syntax error at or near :

2013-03-06 Thread Ian Lawrence Barwick
2013/3/7 Graham Leggett minf...@sharp.fm: (...) Which psql version are you using, and what is the table definition? Version as below, from RHEL6: psql (PostgreSQL) 8.4.13 Aha, there is your problem: testdb=# SELECT version(); version

[GENERAL] round returns -0

2013-03-06 Thread Tony Dare
I'm taking an standard deviation of a population and subtracting it from the average of the same population and rounding the result. Sometimes that result is negative and rounding it returns (or shows up as) a negative zero (-0) in a SELECT. basically: SELECT client_name, avg(rpt_cnt),

[GENERAL] Trust intermediate CA for client certificates

2013-03-06 Thread Ian Pilcher
I am trying to configure PostgreSQL 8.4 to trust an intermediate CA for client certificate validation -- without trusting everything signed by the root CA (or a different intermediate CA). Given the following CA hierarchy, for example, I would like to trust *only* client certificates signed by

Re: [GENERAL] round returns -0

2013-03-06 Thread François Beausoleil
Le 2013-03-06 à 21:42, Tony Dare a écrit : I'm taking an standard deviation of a population and subtracting it from the average of the same population and rounding the result. Sometimes that result is negative and rounding it returns (or shows up as) a negative zero (-0) in a SELECT.