Re: Is there a way to get the name of the calling function in pgplsql?

2018-03-21 Thread Thiemo Kellner, NHC Barhufpflege
Thanks for the hint and please excuse my not thouroughly enough reading of the documentation. I did not suspect such Feature amongst controll structures. Zitat von Pavel Stehule : https://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-CALL-STACK -- Öffentli

Re: psql variable to plpgsql?

2018-04-11 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von Pavel Stehule : No, there is not possible to read/write client side variables from server side. I did not mean that the variable be replaced by its value at execution time but at Installation time. -- Öffentlicher PGP-Schlüssel: http://pgp.mit.edu/pks/lookup?op=get&search=0x8F7

Re: dblink: give search_path

2018-04-11 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von Rene Romero Benavides : What about setting the search path at the user level? ALTER ROLE act SET search_path = act,logger; Best. Thanks for the inspiration. Maybe it is best to create a dedicated user for logging anyway... -- Öffentlicher PGP-Schlüssel: http://pgp.mit.edu/pks/

Re: dblink: give search_path

2018-04-17 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von Adrian Klaver : In addition to my previous suggestions: test=# SELECT public.dblink_connect('dbname=production '); dblink_connect OK test=# select * from public.dblink('show search_path') as t1(search_path text); search_path - main test=# select

Re: array UNNESTed to rows stable with respect to order?

2018-04-17 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von "David G. Johnston" : ?It does not. If the array is not naturally ordered you will want to attach a "with ordinality" clause to it for performing future ordering. Thanks for the hints. Kind regards -- Öffentlicher PGP-Schlüssel: http://pgp.mit.edu/pks/lookup?op=get&search=0x8F70

Re: rehashing catalog cache id 14 for pg_opclass; 17 tups, 8 buckets

2018-04-17 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von Adrian Klaver : What do you have your log levels set to? Thanks for pointing this out. I put client level to debug1. So, I am just lucky not to have got flooded with Messages? -- Öffentlicher PGP-Schlüssel: http://pgp.mit.edu/pks/lookup?op=get&search=0x8F70EFD2D972CBEF -

Re: Microsoft buys GitHub, is this a threat to open-source

2018-06-07 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von Vik Fearing : For many people, this is why sourceforge died: https://en.wikipedia.org/wiki/SourceForge#Project_hijackings_and_bundled_malware Wow! I missed that completely. This is grave. This message was sent using IM

Re: Can you make a simple view non-updatable?

2018-06-08 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von Ryan Murphy : I could see how I could revoke permissions from, say, all users that aren't superusers to INSERT or UPDATE certain views. However, if possible it would be nice to get an error message about the VIEW not being updatable, rather than a user access error, which could be mis

Re: FW: Setting up streaming replication problems

2018-01-23 Thread Thiemo Kellner, NHC Barhufpflege
Andreas, thanks for your reply. I try to set up synchronous streaming replication as try-out. I use my laptop with Debian 9 and PostgreSQL package 10+189.pgdg90+1. And of this PostgreSQL installation I have two clusters main (master) and main2 (hot standby). I tried with Rigg's book and the Post

Re: Pgcrypto (PostgreSQL 10) on Debain 9?

2018-02-06 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von Magnus Hagander : On Tue, Feb 6, 2018 at 1:37 PM, Thiemo Kellner wrote: pgcrypto and uuid-ossp are both in the core package for PostgreSQL 10. So, I take the documentation would be outdated? But why do I get following error? ERROR: function gen_random_uuid() does not exist. create

Re: pgcrypto.gen_random_uuid() or uuid-ossp.uuid_generate_v4()?

2018-02-06 Thread Thiemo Kellner, NHC Barhufpflege
In my testing, gen_random_uuid() is quite a bit faster than uuid_generate_v4(). Thx for sharing your experience. -- Öffentlicher PGP-Schlüssel: http://pgp.mit.edu/pks/lookup?op=get&search=0x8F70EFD2D972CBEF This message was

Re: pgcrypto.gen_random_uuid() or uuid-ossp.uuid_generate_v4()?

2018-02-06 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von Tom Lane : I believe the point of the recommendation is that if you only need type-4 UUIDs, you can get that from pgcrypto without needing the external dependency of the OSSP UUID library. This is a bit less urgent than when that text was written, because now we also support building

Re: Documentation section F

2018-02-07 Thread Thiemo Kellner, NHC Barhufpflege
Zitat von Peter Eisentraut : No, what was discussed was that the Debian packaging included them in the same package as the server instead of having a separate -contrib package. But the modules themselves are still extensions that you need to install into the databases. Oh, another misundersta

Re: Dynamic PL/pgSQL select query: value association propblem

2018-02-16 Thread Thiemo Kellner, NHC Barhufpflege
Thanks for answering. Zitat von Pavel Stehule : Why you don't create query like EXECUTE 'SELECT xxx FROM TAB WHERE A = $1.x AND B = $1.y' USING NEW; I shall try. This would be the direct way, but I doubt the placeholder $1 can be a record. I don't understand tou your case, but usually