Re: [GENERAL] Can we specify transaction level when connectting to external postgresql server via postgres_fdw

2013-07-10 Thread Jov
from the doc: The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consis

[GENERAL] Can we specify transaction level when connectting to external postgresql server via postgres_fdw

2013-07-10 Thread guxiaobo1982
Hi, We are try to connect to Greenplum database from PostgreSQL 9.3 beta2 via postgres_fdw, but the Greenplum Database does not support REPEATABLE READ transactions, can we specify other isolation leves? Regards, Xiaobo Gu

Re: [GENERAL] How to implement a value alias or synonym

2013-07-10 Thread Carlos Oliva
Also this: http://www.postgresql.org/docs/9.2/static/textsearch-configuration.html From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave Sent: Wednesday, July 10, 2013 3:49 PM To: pgsql-general@postgresql.org Subject: [GENERAL] How to

Re: [GENERAL] How to implement a value alias or synonym

2013-07-10 Thread Carlos Oliva
http://www.postgresql.org/message-id/440d446e.7040...@cybertec.at From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave Sent: Wednesday, July 10, 2013 3:49 PM To: pgsql-general@postgresql.org Subject: [GENERAL] How to implement a value

[GENERAL] How to implement a value alias or synonym

2013-07-10 Thread Gauthier, Dave
Hi: v9.0.1 on linux Is there a way to query on synonyms of a value transparent to the user? For example, a column called "animal" can have any text value, including 'horse' and 'cow' and 'pig'. But I want the user to find all the animal='pig' records if they specify 'hog' instead. So..

Re: [GENERAL] Single Line Query Logging

2013-07-10 Thread Adrian.Vondendriesch
Hi Emre, Am 10.07.2013 12:16, schrieb Emre ÖZTÜRK: > Hello all, > > Is there a parameter to log any SQL query as a single line in audit > logs? I have some problems in my SIEM application. If a DBA sends the > query as a single line I can gather the whole query, but if he enters like > > UPDATE

Re: [GENERAL] Removing duplicates

2013-07-10 Thread Ketana Patel
Hi, You can try following query on test database to remove duplicates. DELETE FROM isi.rcited_ref a     WHERE a.ctid <> (SELECT min(ctid) FROM isi.rcited_ref b   WHERE a.rart_id = b.rart_id       AND a.r9 = b.r9   AND a.ra = b.ra   AND a.ry = b.ry   AND a.rw =

Re: [GENERAL] function with unknown params

2013-07-10 Thread Kevin Grittner
giozh wrote: > ok, it works. But why on error message i had that two unknown > data type? if was an error on date type, why it don't signal > that? Because PostgreSQL treats a quoted literal as being of unknown type -- each of these could have matched a parameter of any type, and would have been

Re: [GENERAL] Force ssl connection

2013-07-10 Thread Jeff Janes
On Wed, Jul 10, 2013 at 3:04 AM, Muhammad Bashir Al-Noimi wrote: > On Tue, Jul 9, 2013 at 11:21 PM, Jeff Janes wrote: >> From your original email: >> db.setHostName("localhost"); >> >> So localhost is probably matching "127.0.0.1/32" or "::1/128", which >> are explicitly allowed. > > I'm using th

Re: [GENERAL] Removing duplicates

2013-07-10 Thread Giuseppe Broccolo
Dear Johann, I tried (with PostgreSQL 9.2) to run the two DELETE statements you describe in your mail (the first based on the "id" field, the second on the ctid) and they work! I have to point out that if you use the DELETE based on the "id" field YOU'LL DELETE ALL RECORDS having at least one

Re: [GENERAL] dynamic partitioning

2013-07-10 Thread dafNi zaf
hello again! since there was a problem with my email and the reply was not sent, so I'm re-posting my reply.. Again.. the structure as I exported it from phpPgAdmin is: *-- My table 'foo' * *CREATE TABLE foo ( * *foo_id integer NOT NULL,* *blaa_id integer NOT NULL,* *blaa_num integ

Re: [GENERAL] Force ssl connection

2013-07-10 Thread Adrian Klaver
On 07/10/2013 03:20 AM, Muhammad Bashir Al-Noimi wrote: On Wed, Jul 10, 2013 at 12:16 PM, Magnus Hagander wrote: requiressl=0 doesn't mean what you think it means, and that's one reason it has been deprecated since at least 8.2. requiressl=0 means "negotiate. use ssl if the server asks for it,

Re: [GENERAL] Computing count of intersection of two queries (Relational Algebra --> SQL)

2013-07-10 Thread Kevin Grittner
Robert James wrote: > In relational algebra, I have relation R and relation S, and want > to find the cardinality of R, of S, and of R-intersect-S. > > I know the SQL for R and S.  What's the best way to compute the > cardinality of each relation (query) and of their intersection? If R and S hav

Re: [GENERAL] Force ssl connection

2013-07-10 Thread Muhammad Bashir Al-Noimi
On Wed, Jul 10, 2013 at 12:16 PM, Magnus Hagander wrote: > requiressl=0 doesn't mean what you think it means, and that's one > reason it has been deprecated since at least 8.2. > > requiressl=0 means "negotiate. use ssl if the server asks for it, but > accept not using ssl". So this will connect w

Re: [GENERAL] Force ssl connection

2013-07-10 Thread Magnus Hagander
On Wed, Jul 10, 2013 at 12:04 PM, Muhammad Bashir Al-Noimi wrote: > On Tue, Jul 9, 2013 at 11:21 PM, Jeff Janes wrote: >> From your original email: >> db.setHostName("localhost"); >> >> So localhost is probably matching "127.0.0.1/32" or "::1/128", which >> are explicitly allowed. > > I'm using t

[GENERAL] Single Line Query Logging

2013-07-10 Thread Emre ÖZTÜRK
Hello all, Is there a parameter to log any SQL query as a single line in audit logs? I have some problems in my SIEM application. If a DBA sends the query as a single line I can gather the whole query, but if he enters like UPDATE x ... y=Z .. where .. I o

Re: [GENERAL] Force ssl connection

2013-07-10 Thread Muhammad Bashir Al-Noimi
On Tue, Jul 9, 2013 at 11:21 PM, Jeff Janes wrote: > From your original email: > db.setHostName("localhost"); > > So localhost is probably matching "127.0.0.1/32" or "::1/128", which > are explicitly allowed. I'm using this and still able to connect without SSL db.setHostName("192.168.0.74")

Re: [GENERAL] Force ssl connection

2013-07-10 Thread Muhammad Bashir Al-Noimi
On Tue, Jul 9, 2013 at 11:16 PM, Adrian Klaver wrote: > Where are you connecting from? If you are connecting locally using > sockets(local above) or host(line 3,4,5 above) then you are bypassing ssl. I'm connecting from 192.168.0.74 and I commented line5 as following: local all pos

[GENERAL] Removing duplicates

2013-07-10 Thread Johann Spies
I have used this method successfully on another table but this one is not working. I have a table of nearly 800 million records with some duplicates in. Here is an example: select rart_id, r9, ra, ry, rw, rv, rp, rs, ri from isi.rcited_ref where rart_id = 'A1986D733500019'; renders a result of