Re: [GENERAL] jsonb

2017-11-14 Thread Johannes Graën
On 11/14/2017 11:30 PM, hmidi slim wrote: > I'm trying to use the function to_jsonb and create the name: > to_jsonb ('{"key1":" ' || 'text1' || '","key2":" ' || 'text2' || '"}'); This query converts a string into a JSON object that consist of that string. I guess what you intend to accomplish is

Re: [GENERAL] Combine multiple text search configuration

2017-11-12 Thread Johannes Graën
Hi, On 2017-11-06 09:17, hmidi slim wrote: > Hi, > I want to know if I can combine multiple text search configurations when > I tried to use FTS. > Is there any options like this: > *to_tsvector(['english', 'french'], document)* > * > * > Trying to create a new text configuration: > *Create text

Re: [GENERAL] Combine multiple text search configuration

2017-11-12 Thread Johannes Graën
On 2017-11-07 08:27, hmidi slim wrote: > Hi,  > Thank for your proposition but when to use this query :  > (to_tsvector('english', document) || to_tsvector('french', document)) @@ > (to_tsquery('english', query) || to_tsquery('french', query)) > I think that the performance decrease and not a good

Fwd: Re: [GENERAL] Combine multiple text search configuration

2017-11-09 Thread Johannes Graën
On 2017-11-07 08:27, hmidi slim wrote: > Hi,  > Thank for your proposition but when to use this query :  > (to_tsvector('english', document) || to_tsvector('french', document)) @@ > (to_tsquery('english', query) || to_tsquery('french', query)) > I think that the performance decrease and not a good

Re: [GENERAL] Combine multiple text search configuration

2017-11-06 Thread Johannes Graën
Hi, On 2017-11-06 09:17, hmidi slim wrote: > Hi, > I want to know if I can combine multiple text search configurations when > I tried to use FTS. > Is there any options like this: > *to_tsvector(['english', 'french'], document)* > * > * > Trying to create a new text configuration: > *Create text

[GENERAL] create roles as normal user

2016-08-28 Thread Johannes
this test the function was created as superuser). ```sql CREATE OR REPLACE FUNCTION add_db1_user() returns void language sql STRICT security definer AS $$ CREATE ROLE db1_testuser login password 'secret'; $$ ERROR: permission denied to create role Best regards Johannes signature.asc Descriptio

[GENERAL] recordings of pgconf us 2016

2016-05-28 Thread Johannes
I guess I have seen all video recording from pgconf us 2015 at youtube. Are there any recording from this year available? Best regards Johannes signature.asc Description: OpenPGP digital signature

Re: [GENERAL] execute same query only one time?

2016-02-09 Thread Johannes
Am 09.02.2016 um 00:56 schrieb Vitaly Burovoy: > On 2/8/16, Johannes <jo...@posteo.de> wrote: >> Am 08.02.2016 um 21:50 schrieb Vitaly Burovoy: >>> On 2/8/16, Johannes <jo...@posteo.de> wrote: >>>> Am 08.02.2016 um 21:17 schrieb Vitaly Burovoy: >&

Re: [GENERAL] execute same query only one time?

2016-02-08 Thread Johannes
Am 08.02.2016 um 21:17 schrieb Vitaly Burovoy: > On 2/8/16, Johannes <jo...@posteo.de> wrote: >> Am 08.02.2016 um 20:15 schrieb David G. Johnston: >>> On Mon, Feb 8, 2016 at 12:05 PM, Johannes <jo...@posteo.de> wrote: >>> >>>> Hi, >>&

Re: [GENERAL] execute same query only one time?

2016-02-08 Thread Johannes
Am 08.02.2016 um 21:33 schrieb Vitaly Burovoy: > On 2/8/16, Johannes <jo...@posteo.de> wrote: >> >> Am 08.02.2016 um 20:32 schrieb Vitaly Burovoy: >>> On 2/8/16, Adrian Klaver <adrian.kla...@aklaver.com> wrote: >>>> Based on rough guess o

Re: [GENERAL] execute same query only one time?

2016-02-08 Thread Johannes
Am 08.02.2016 um 20:32 schrieb Vitaly Burovoy: > On 2/8/16, Adrian Klaver <adrian.kla...@aklaver.com> wrote: >> On 02/08/2016 11:05 AM, Johannes wrote: >>> Imaging following situation: I want to receive two result sets from two >>> tables, referring to a sp

[GENERAL] execute same query only one time?

2016-02-08 Thread Johannes
returns multiple rows. begin; select id, col1, col2, ... from t0 where id = (select max(id) from t0 where col1 = value1 and col2 = value2 and ...); select col1 from t1 where t0_id = (select max(id) from t0 where col1 = value1 and col2 = value2 and ...); commit; Best regards Johannes signature.asc

Re: [GENERAL] execute same query only one time?

2016-02-08 Thread Johannes
Am 08.02.2016 um 20:15 schrieb David G. Johnston: > On Mon, Feb 8, 2016 at 12:05 PM, Johannes <jo...@posteo.de> wrote: > >> Hi, >> >> is there a best practice to share data between two select statements? >> >> Imaging following situation: I want to

Re: [GENERAL] execute same query only one time?

2016-02-08 Thread Johannes
Am 08.02.2016 um 21:50 schrieb Vitaly Burovoy: > On 2/8/16, Johannes <jo...@posteo.de> wrote: >> Am 08.02.2016 um 21:17 schrieb Vitaly Burovoy: >>> On 2/8/16, Johannes <jo...@posteo.de> wrote: >>>> Am 08.02.2016 um 20:15 schrieb David G. Johnston: >&

Re: [GENERAL] long transfer time for binary data

2016-01-25 Thread Johannes
Am 25.01.2016 um 19:59 schrieb Daniel Verite: > Johannes wrote: > >> \lo_export 12345 /dev/null is completed in 0.86 seconds. > > If it's an 11MB file through a 100Mbits/s network, that's > pretty much the best that can be expected. > > I would think the ab

Re: [GENERAL] long transfer time for binary data

2016-01-23 Thread Johannes
Am 23.01.2016 um 23:38 schrieb John R Pierce: > On 1/23/2016 2:19 PM, Johannes wrote: >> I save my images as large object, which afaik is in practise not >> readable with a binary cursor (we should use the lo_* functions). And of >> course I already use the LargeObjectMana

Re: [GENERAL] long transfer time for binary data

2016-01-23 Thread Johannes
Am 23.01.2016 um 01:25 schrieb Daniel Verite: > Johannes wrote: > >> psql >> select lo_get(12345); >> +ssl -compression 6.0 sec >> -ssl 4.4 sec > > psql requests results in text format so that SELECT does not > really test the trans

Re: [GENERAL] long transfer time for binary data

2016-01-22 Thread Johannes
Am 21.01.2016 um 08:44 schrieb George Neuner: > On Wed, 20 Jan 2016 22:29:07 +0100, Johannes <jo...@posteo.de> wrote: > >> I noticed transferring a large object or bytea data between client and >> server takes a long time. >> For example: An image with a real size of

Re: [GENERAL] long transfer time for binary data

2016-01-21 Thread Johannes
6.0 sec -ssl 4.4 sec java/jdbc only while(in.read(buf,0,len)) +ssl -compression 6.0 sec -ssl 3.0 sec (+ 1.8 sec for new Image()) Here is a link for insecure ssl compression: https://en.wikipedia.org/wiki/Comparison_of_TLS_implementations#Compression Best Regargs Johannes

[GENERAL] long transfer time for binary data

2016-01-20 Thread Johannes
application more quickly? Or are there planned improvements to postgresql (transferring the real binary data)? Best regards Johannes signature.asc Description: OpenPGP digital signature

[GENERAL] update inside function does not use the index

2015-11-16 Thread Johannes
%' uses the index of the path field ( ~ 15 ms ). Does anyone know how to fix that? Thanks, Johannes signature.asc Description: OpenPGP digital signature

Re: [GENERAL] update inside function does not use the index

2015-11-16 Thread Johannes
That solves my problem. Thanks!! Best regards Johannes Am 16.11.2015 um 18:19 schrieb Tom Lane: > Adrian Klaver <adrian.kla...@aklaver.com> writes: >> On 11/16/2015 08:03 AM, Johannes wrote: >>>> In every loop I execute an update with a where LIKE condition, which

Re: [GENERAL] update inside function does not use the index

2015-11-16 Thread Johannes
behind the scenes no join is needed. Best regards Johannes Am 16.11.2015 um 15:22 schrieb Thomas Kellerer: > Johannes schrieb am 16.11.2015 um 14:56: >> I have problems with a self written function, which does not use the >> index, which takes very long (500 ms per update). >> >

Re: [GENERAL] update inside function does not use the index

2015-11-16 Thread Johannes
No, i did a mistake while simplifying it. It should be FOR i IN SELECT id, level, path_names||'%' as path_names from x LOOP update x set path_ids[i.level] = i.id where path_names like i.path_names; Sorry. Best regards Johannes Am 16.11.2015 um 15:10 schrieb Adrian Klaver: > On 11/16/2015 05

Re: [GENERAL] update inside function does not use the index

2015-11-16 Thread Johannes
A function seams to be atomic for the analyze command (or?) EXPLAIN ANALYZE select my_function(); returns no inner query plan, just the costs, rows and width Am 16.11.2015 um 17:57 schrieb Adrian Klaver: > EXPLAIN ANALYZE select ... your_function(...); signature.asc Description: OpenPGP

[GENERAL] UNIQUE contraint that is initially deferred in Postgres 8.4.13

2014-03-13 Thread Johannes Bauer
Hi list, I'm having trouble with a UNIQUE constraint that I need to have DEFERRABLE INITIALLY DEFERRED. On my Dev machine (Postgres 9.1) it works fine: alter table foo drop constraint bar; ALTER TABLE alter table foo add constraint bar UNIQUE (col1, col2) deferrable initially deferred; ALTER

Re: [GENERAL] UNIQUE contraint that is initially deferred in Postgres 8.4.13

2014-03-13 Thread Johannes Bauer
On 13.03.2014 13:02, Magnus Hagander wrote: My guess is you're looking in the wrong place in the docs - can you specify where you are looking? If you are in the right place then the docs are wrong. Here: http://www.postgresql.org/docs/8.4/static/sql-createtable.html Deferrable unique

[GENERAL] Some questions about postgresql's default text search parser

2013-11-06 Thread johannes graën
personnes'::text s) x; select (ts_parse(3722,s)).*, (ts_debug(s)).* from (select 'heu d''anar-hi'::text s) x; Best Johannes [1] http://doxygen.postgresql.org/wparser__def_8c_source.html [2] http://www.postgresql.org/docs/9.3/static/textsearch-parsers.html -- Sent via pgsql-general mailing list

Re: [GENERAL] large database

2012-12-11 Thread Johannes Lochmann
Hello Jan, hello List On 12/11/2012 09:10 AM, Jan Kesten wrote: There are some sildes from Sun/Oracle about ZFS, ZIL, SSD and PostgreSQL performance (I can look if I find them if needed). I would very much appreciate a copy or a link to these slides! Johannes -- Sent via pgsql-general

Re: [GENERAL] large database

2012-12-11 Thread Johannes Lochmann
Hi all, On 12/11/2012 11:02 AM, Jan Kesten wrote: I would very much appreciate a copy or a link to these slides! here they are: http://www.scribd.com/mobile/doc/61186429 thank you very much! Johannes -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

[GENERAL] SEPostgreSQL alive?

2012-09-04 Thread Johannes Segitz
? Regards, Johannes -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Force ARE in regexp string

2010-09-22 Thread Johannes Öberg
On 2010-09-15 15:33, Tom Lane wrote: =?ISO-8859-1?Q?Johannes_=D6berg?=johannes.ob...@proactivegaming.com writes: I've set regex_flavor to ARE, and I've tried prefixing my strings, i.e. ~* E'***:abc' but for some reason postgres treats all my regexps as BRE's. Well, the symptom as described

[GENERAL] Force ARE in regexp string

2010-09-15 Thread Johannes Öberg
Hi! I'm trying to do an advanced regexp match but postgres doesn't seem to let me. I've set regex_flavor to ARE, and I've tried prefixing my strings, i.e. ~* E'***:abc' but for some reason postgres treats all my regexps as BRE's. Common newbie gotchas? I'm trying it directly from psql.exe

[GENERAL] pg_xlog - files are guaranteed to be sequentialy named?

2007-06-13 Thread Johannes Konert
working model. Regards Johannes ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] pg_xlog - files are guaranteed to be sequentialy named?

2007-06-13 Thread Johannes Konert
Greg Smith wrote: He's talking about wiping out the ones on the backup server, so I think Johannes means erasing the old archived logs on the secondary here. That can screw up your backup if you do it wrong, but it's not an all-caps worthy mistake. yes, that's what I am talking about related

Re: [GENERAL] pg_xlog - files are guaranteed to be sequentialy named?

2007-06-13 Thread Johannes Konert
Johannes Konert wrote: But during the day I came out with an solution: I store the WAL-files with the time-stamp of archiving in their file-name. Thus I can order and delete them safely. Your hint was the one, that helped me to find that solution - so thanks for that, Greg.and the others

Re: [GENERAL] pg_xlog - files are guaranteed to be sequentialy named?

2007-06-13 Thread Johannes Konert
Greg Smith wrote: On Wed, 13 Jun 2007, Johannes Konert wrote: If someone corrects the servers computer-time/date to a date before current time (e.g. set the clock two hours back), then the newer WAL files will have an older timestamp and will be deleted by accident. This should never happen

Re: [GENERAL] pg_xlog - files are guaranteed to be sequentialy named?

2007-06-13 Thread Johannes Konert
or not the naming follows this rule. Of course I calculated the number of possible filenames before, but as I said, I was not sure, that Postgresql follows a guaranteed naming convention of always increasing WAL filenames. Anyway, this is now for sure and I will rely on that now. Regards Johannes

Re: [GENERAL] Suppress checking of chmod 700 on data-dir?

2007-06-12 Thread Johannes Konert
. Suids are not working on bash-scripts, but with a restricted entry in /etc/sudoers now the backup-user can execute a copy-and-access-script to get the files from within PGDATA-dir. Regards Johannes ---(end of broadcast)--- TIP 4: Have you searched

Re: [GENERAL] Suppress checking of chmod 700 on data-dir?

2007-06-11 Thread Johannes Konert
Joshua D. Drake wrote: Johannes Konert wrote: But that is not my point. The question is where I can change the enforced chmod 700 postgresql always wants me to set. You can't. You can however change the postgresql.conf to put look for files somewhere besides $PGDATA and thus you would be able

[GENERAL] Suppress checking of chmod 700 on data-dir?

2007-06-07 Thread Johannes Konert
) ? Thanks for your short replies. I could not figure it out in the documentation. Regards Johannes postgresql 8.2.4 on ubuntu dapper (if this question came 100times, I apologize for being unable to find it) ---(end of broadcast)--- TIP 4: Have you

Re: [GENERAL] Suppress checking of chmod 700 on data-dir?

2007-06-07 Thread Johannes Konert
that? Anyway thanks for your help. I'll keep searching for a solution. Regards Johannes ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your

Re: [GENERAL] Suppress checking of chmod 700 on data-dir?

2007-06-07 Thread Johannes Konert
/interactive/continuous-archiving.html section 23.3.2) you can copy the files while postgres is running (respecting pg_start_backup and pg_stop_backup) But that is not my point. The question is where I can change the enforced chmod 700 postgresql always wants me to set. Regards Johannes

Re: [GENERAL] Postgres 8.1.4 sanity_check failed on SuSE 8.2

2006-09-18 Thread Johannes Weberhofer, Weberhofer GmbH
Tom, thank you! from cvs I copied the latest strategy to make the sanity checks and removed those values which were added after version 8.1.4. Using that patch, I can compile postgres without any problems. This version runs nicely on several servers. Best regards, Johannes Johannes

[GENERAL] Postgres 8.1.4 sanity_check failed on SuSE 8.2

2006-09-06 Thread Johannes Weberhofer, Weberhofer GmbH
On the compiling machine, I have (a clean) SuSE 8.2 running, the filesystem is a xfs file system. The last version, Postgres 8.1.3, compiled nicely some time ago. Any ideas how I can fix this? Best regards, Johannes Weberhofer -- |- | weberhofer GmbH