[GENERAL] restore/pg_dump only one id, with relation (cascade)

2016-10-27 Thread Hans Schou
Hi We have a system with several users. Sometimes one of the users make a mistake with his data and want to restore, like he want to do an undo. Only one user should be restored, not all users. I work as sysadm so I can not change the system, but has to solve the task at this level. My approach

[GENERAL] Feature proposal, DBURL: psql pgsql://joe:p4zzw...@example.org:2345/dbname

2017-07-05 Thread Hans Schou
Hi The dburl (or dburi) has become common to use by many systems connecting to a database. The feature is that one can pass all parameters in a string, which has similar pattern as http-URI do. Especially when using psql in a script, having the credentials in one string is convenient. The syntax

Re: [GENERAL] Feature proposal, DBURL: psql pgsql://joe:p4zzw...@example.org:2345/dbname

2017-07-05 Thread Hans Schou
2017-07-05 15:15 GMT+02:00 Albe Laurenz : > > Unless I misunderstand, this has been in PostgreSQL since 9.2: > Sorry! I did not read the *new* manual. (OK, 9.2 is not that new) It is even mentioned in the man page. Then I have a new proposal. Write a note about in psql --help ./hans

Re: [GENERAL] Re: Feature proposal, DBURL: psql pgsql://joe:p4zzw...@example.org:2345/dbname

2017-07-05 Thread Hans Schou
2017-07-05 16:29 GMT+02:00 Thomas Kellerer : > Hans Schou schrieb am 05.07.2017 um 14:27: > > The dburl (or dburi) has become common to use by many systems > > connecting to a database. The feature is that one can pass all > > parameters in a string, which has similar p

Re: [GENERAL] Feature proposal, DBURL: psql pgsql://joe:p4zzw...@example.org:2345/dbname

2017-07-05 Thread Hans Schou
2017-07-05 15:41 GMT+02:00 Adrian Klaver : > > [scheme[<+>dsn]]://[[username[:[password]]@][host][:port][/[ > dbname][/[[table[/[column[,column...]*]]]|sql]]] > ^ > > The thing is that in a quick search on this I did not find a reference > implementation of

[GENERAL] pg_upgrade?: Upgrade method from/to any version on random OS?

2017-09-27 Thread Hans Schou
If I ask this question without mention the PG version I upgrade from and to, and don't mention the operating system, and don't mention replication, would the standard answer be: Use pg_upgrade! I have looked through https://www.postgresql.org/docs/9.6/static/pgupgrade.html but it seems more comp

[GENERAL] Percent-encoding conversion to binary, %C2%A9 = ©

2008-03-13 Thread Hans Schou
Hi I have a little trouble with the chr() function. I have a string like this: "Copyright+%C2%A9+1856+Na%C3%AFve+retros%C2%AE" which should be converted to binary string like: "Copyright © 1856 Naïve retros®" Is there an easy way to do this conversion? I have tried to do it with a function, bu