Re: Wanted: postgresql-9.6-dbg_9.6.5-1.pgdg80+1_amd64.deb

2018-05-03 Thread Karsten Hilbert
On Thu, May 03, 2018 at 04:23:14PM +0800, Craig Ringer wrote: > I'm trying to debug a PostgreSQL install with a very hard to reproduce > bug. The user did not install debug info, and apt.postgresql.org has > purged the packages. 2ndQuadrant doesn't yet have a mirror of all > historical packages up

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Karsten Hilbert
On Thu, May 10, 2018 at 11:19:36AM +0100, Ben Hood wrote: > The question should not be “how does Postgres store the timestamp internally”. > > Rather it should read “is enforcing the submission of UTC denominated > timestamps in the server by using a domain a sensible way to enforce a policy >

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Karsten Hilbert
On Thu, May 10, 2018 at 06:41:04AM -0700, Adrian Klaver wrote: >> OK, so by using TIMESTAMP WITH TIME ZONE, you force all apps to submit >> timezone qualified timestamps in what language they are written in. > > Not really: > > https://www.postgresql.org/docs/10/static/datatype-datetime.html >

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Karsten Hilbert
I think for the use case you describe, and given the fact that it does work in production, your solution simply shows The Power Of PostgreSQL. Java tries to be cross-platform, JDBC tries to be cross-database -- these goals don't seem to lend themselves to advocating or understanding what one parti

Re: Code of Conduct plan

2018-09-14 Thread Karsten Hilbert
On Fri, Sep 14, 2018 at 10:38:56AM +0200, Chris Travers wrote: > > I really have to object to this addition: > > "This Code is meant to cover all interaction between community members, > > whether or not it takes place within postgresql.org infrastructure, so > > long as there is not another Code

Re: Code of Conduct plan

2018-09-15 Thread Karsten Hilbert
On Sat, Sep 15, 2018 at 12:11:37PM -0400, Melvin Davidson wrote: > How about we just simplify the code of conduct to the following: > Any member in the various PostgreSQL lists is expected to maintain > respect to others and not use foul language. A variation from > the previous sentence shall be

Re: PostgreSQL 11 and security

2018-10-19 Thread Karsten Hilbert
On Fri, Oct 19, 2018 at 10:22:05AM +, ROS Didier wrote: >I would like to know what's new in security with PostgreSQL 11 https://www.postgresql.org/docs/current/static/release-11.html#id-1.11.6.5.5 sections "Permissions" and "Authentication" And then, bugs have been

Re: timestamp out of range while casting return value to function's return type

2019-08-24 Thread Karsten Hilbert
On Sat, Aug 24, 2019 at 12:57:07AM +, Thiemo Kellner wrote: > Call: select utils.get_max_timestamptz(); > -- > > Function > -- > create or replace function GET_MAX_TIMESTAMPTZ() > returns timestamptz > language plpgsql > immutable > -- Include the hosting schema into search_path so tha

Re: database "cdf_100_1313" does not exist

2019-09-09 Thread Karsten Hilbert
tabase where datname in > ('CDF_100_1313')"/usr/lib/postgresql/11/bin/psql > -p 5432 -U postgres -d $DBLIST -c "GRANT CONNECT ON DATABASE "$DBLIST" TO > cpupdate" > > ERROR: database "cdf_100_1313" does not exist Likely a quoting issue. Karsten Hilbert -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Has there been any discussion of custom dictionaries being defined in the database?

2019-10-17 Thread Karsten Hilbert
On Thu, Oct 17, 2019 at 11:52:39AM +0200, Tom Lane wrote: > Morris de Oryx writes: > > Given that Amazon is bragging this week about turning off Oracle, it seems > > like they could kick some resources towards contributing something to the > > Postgres project. With that in mind, is the idea of d

Re: Encoding/collation question

2019-12-12 Thread Karsten Hilbert
On Thu, Dec 12, 2019 at 05:03:59AM +, Andrew Gierth wrote: > Rich> I doubt that my use will notice meaningful differences. Since > Rich> there are only two or three databases in UTF8 and its collation > Rich> perhaps I'll convert those to LATIN1 and C. > > Note that it's perfectly fine to u

Re: Encoding/collation question

2019-12-18 Thread Karsten Hilbert
On Thu, Dec 12, 2019 at 08:35:53AM -0500, Tom Lane wrote: > C collation basically devolves to strcmp/memcmp, which are as standard > and well-defined as can be. If you're happy with the way it sorts > things then there's no reason not to use it. So that's the collation to use when "technical" so

unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536

2020-03-15 Thread Karsten Hilbert
Dear community, we are seeing the below error on PG 9.6.16 on Debian: (different issue from the psycopg2 one recently posted by me) > /home/marc# pg_dump -p 5432 --username=gm-dbo --dbname=gnumed_v22 > --compress=0 --no-sync --format=custom --file=/dev/null > pg_dump: Ausgabe des Inhalts der Ta

Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536

2020-03-15 Thread Karsten Hilbert
On Sun, Mar 15, 2020 at 07:23:49PM +0100, Karsten Hilbert wrote: > We then tried to DELETE the offending row > > delete from blobs.doc_obj where pk = 82224; > > but that, again, shows the "unexpected chunk" problem. According to http://www.databasesoup.

Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536

2020-03-15 Thread Karsten Hilbert
On Sun, Mar 15, 2020 at 12:58:53PM -0700, Adrian Klaver wrote: > > > We then tried to DELETE the offending row > > > > > > delete from blobs.doc_obj where pk = 82224; > > > > > > but that, again, shows the "unexpected chunk" problem. > > > > According to > > > > http://www.databasesoup.com/2

Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536

2020-03-15 Thread Karsten Hilbert
On Sun, Mar 15, 2020 at 05:04:06PM -0400, Jan Wieck wrote: > Have you tried to reindex the table? Toast internally forces an index scan, > so missing index tuples or an otherwise corrupted toast index would have > the same symptoms as toast chunks actually missing. We sure did, but thanks for rem

Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536

2020-03-15 Thread Karsten Hilbert
On Sun, Mar 15, 2020 at 02:35:39PM -0700, Adrian Klaver wrote: > On 3/15/20 1:21 PM, Karsten Hilbert wrote: > > On Sun, Mar 15, 2020 at 12:58:53PM -0700, Adrian Klaver wrote: > > > > > > > We then tried to DELETE the offending row > > > > > >

Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536

2020-03-20 Thread Karsten Hilbert
On Sun, Mar 15, 2020 at 08:11:18PM -0400, Tom Lane wrote: > Karsten Hilbert writes: > >>> According to > >>> http://www.databasesoup.com/2013/10/de-corrupting-toast-tables.html > >>> an UPDATE of the row is recommended -- should that work > >>>

Re: unexpected chunk number 2 (expected 0) for toast value ... in pg_toast_18536

2020-03-20 Thread Karsten Hilbert
On Mon, Mar 16, 2020 at 12:38:35PM -0700, Andres Freund wrote: > > We have ruled out (?) below-PG hardware problems by a > > successful run of: > > > > cp -rv —preserve=all /var/lib/postgresql/9.6 /tmp/ > > FWIW, I don't think that rules out hardware problems at all. In plenty > cases of corr

Re: Enforcing uniqueness on [real estate/postal] addresses

2020-05-12 Thread Karsten Hilbert
On Tue, May 12, 2020 at 09:55:56PM +0100, Peter Devoy wrote: > >Is is possible to have two entries which have the same > >address_identifier_general, street and postcode, but different > >descriptions? > > Unfortunately, yes. The data comes from gov't systems to > regulate the development/alterat

Re: Strategy for materialisation and centralisation of data

2020-05-21 Thread Karsten Hilbert
On Thu, May 21, 2020 at 03:35:59PM +0100, Rory Campbell-Lange wrote: > We have quite a few databases of type a and many of type b in a cluster. > Both a and b types are fairly complex and are different solutions to a > similar problem domain. All the databases are very read-centric, and all > dat

Re: Strategy for materialisation and centralisation of data

2020-05-21 Thread Karsten Hilbert
On Thu, May 21, 2020 at 09:52:02PM +0100, Rory Campbell-Lange wrote: > > Might postgres_fdw help in any way ? > > Thanks for the suggestion. As I noted we are already using pl/proxy and > it works well, although we are soaking up a lot of connections with it. > >From my reading of the postgres_fdw

Re: Suggestion to Monitoring Tool

2020-05-27 Thread Karsten Hilbert
On Wed, May 27, 2020 at 10:15:49PM +0530, postgann2020 s wrote: > Environment Details: > OS: RHEL 7.2 > Postgres: 9.5.15 > Master-Slave with Streaming replication > > We are planning to implement the monitoring tool for our environment. > > Could someone please suggest the Monitoring Tool based on

Re: Linux Update Experience

2020-05-28 Thread Karsten Hilbert
On Thu, May 28, 2020 at 02:36:34PM +, Zwettler Markus (OIZ) wrote: > Hi Adrian, > > I'm not talking about this specific bug or its resolution. > > I want to talk about the Linux update problem in general. > > Anyone updating Linux might get such nerving dependency troubles. > > How do you hand

Re: Oracle vs. PostgreSQL - a comment

2020-06-01 Thread Karsten Hilbert
On Mon, Jun 01, 2020 at 12:36:14PM +0700, Stefan Knecht wrote: > The rubber duck barely tells you how and why it floats It sure doesn't spoonfeed but it certainly does tell us *exactly* how and why it floats. https://www.postgresql.org/docs/devel/install-getsource.html Best, Karsten --

Re: psql: FATAL: database "postgres" does not exist or ERROR: 23505: duplicate key value violates unique constraint "pg_namespace_nspname_index"

2020-07-15 Thread Karsten Hilbert
On Wed, Jul 15, 2020 at 10:03:06PM +0530, Naresh Kumar wrote: > Already I tried to connect with template0, template1, user database name, > postgres, nothing is working getting same error message as mentioned in > trail mail. > > For the second one, yes we don't have backups to restore, we don't h

Re: Extension vs Implementing Wire Protocol

2020-07-20 Thread Karsten Hilbert
On Mon, Jul 20, 2020 at 10:36:26PM +0200, Thomas Kellerer wrote: > > * 'SELECT * FROM table;' should return masked versions of the columns > > based on policy for that specific user. > > * 'SELECT * FROM table;' should return just the columns accessible to a  > > specific user. > > > > Questi

Aw: Implement a new data type

2020-09-04 Thread Karsten Hilbert
> If I want to create a new type Person (firstname varchar, lastname varchar, > address varchar ...) > what is the best way to procede in Postgresql   The best way is to re-evaluate the "I want". Karsten

Re: Problem close curser after rollback

2020-09-30 Thread Karsten Hilbert
On Wed, Sep 30, 2020 at 09:06:13PM +0200, Matthias Apitz wrote: > Btw: In all of the other DBS (Informix, Sybase, Oracle) we could define that > point with START TRANSACTION. You can always use SET SAVEPOINT. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Set COLLATE on a session level

2020-11-20 Thread Karsten Hilbert
On Fri, Nov 20, 2020 at 03:32:48PM +0100, Pavel Stehule wrote: > pá 20. 11. 2020 v 15:28 odesílatel Dirk Mika > napsal: > > > Let's assume there is an app that accesses the same database from > > different countries. And in this app data should be displayed ordered. And > > the sort order is not

Re: Set COLLATE on a session level

2020-11-30 Thread Karsten Hilbert
Am Mon, Nov 30, 2020 at 10:11:38AM + schrieb Dirk Mika: > > Or views in schemas per locale. Selecting the search path > > per locale pulls in the right view. > > And one view per locale would mean that I would have to > create a whole schema including all views for each locale I > want to supp

Aw: Re: Set COLLATE on a session level

2020-12-05 Thread Karsten Hilbert
> > Or a "smart" view. Set a session variable before running the > > query and have the (one) view return the locale'd data based > > on the session variable ... > > > > set session "mika.current_locale" = 'locale@2_use'; > > > > and use > > > > select current_setting('mika.current_

Aw: Re: Set COLLATE on a session level

2020-12-05 Thread Karsten Hilbert
> There's [...] but few differences across linguistic sorts. > These differences tend to be subtle and ignorable by end users. But _when_ they matter they matter a lot: Lists of peoples' names in some not-quite expected order are a major pain to skim over, for example. OP is in the business of t

Re: Getting "could not read block" error when creating an index on a function.

2020-12-30 Thread Karsten Hilbert
Am Wed, Dec 30, 2020 at 02:37:59PM -0500 schrieb Demitri Muna: > I want to index the results of these repeated, unchanging calculations to > speed up other queries. Which mechanism would be best to do this? Create > additional columns? Create another table? A materialized view ? Karsten -- GPG

Re: How to keep format of views source code as entered?

2021-01-08 Thread Karsten Hilbert
Am Fri, Jan 08, 2021 at 08:38:29AM + schrieb Markhof, Ingolf: > I am really surprised that PostgreSQL is unable to keep the > source text of a view. Honestly, for me the looks like an > implementation gap. Consider software development. You are > writing code in C++ maybe on a UNIX host. And w

Re: count(*) vs count(id)

2021-02-03 Thread Karsten Hilbert
Am Wed, Feb 03, 2021 at 01:43:14AM -0500 schrieb Cherio: > I just ran a few practical tests on large (~14mil rows) tables that have > multiple indexes. > > SELECT COUNT(id) forces PostgreSQL to use the primary key index. > SELECT COUNT(*) allows PostgreSQL to chose an index to use and it seems to

Aw: Re: Localizing stored functions by replacing placeholders in their body

2021-03-02 Thread Karsten Hilbert
> I'm not sure this is a great approach to in-database translations: you > have one function per string, which is cumbersome, bloated and probably > slow. I would suggest having a function that takes a string and returns > its translation, which is obtained from a couple of tables: one where > the

Aw: Re: How long does iteration over 4-5 million rows usually take?

2022-04-02 Thread Karsten Hilbert
> > On Apr 1, 2022, at 10:18 PM, Ron wrote: > > > >  On 4/1/22 20:34, Shaozhong SHI wrote: > >> > >> I have a script running to iterate over 4-5 million rows. It keeps > >> showing up in red in PgAdmin. It remains active. > >> > >> How long does iteration over 4-5 million rows usually take?

Re: Transaction and SQL errors

2022-04-04 Thread Karsten Hilbert
Am Mon, Apr 04, 2022 at 11:33:14AM + schrieb Sebastien Flaesch: > Is there any plan to have an equivalent of psql's > > set ON_ERROR_ROLLBACK on > > in the DB engine? That is already what happens. SQL fails, transaction rolls back. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D

PG14: "is of" vs pg_typeof

2022-04-23 Thread Karsten Hilbert
PostgreSQL 14.2-1 Dear readers, it used to be possible to say (inside plpgsql): if _value is of (text, char, varchar, name) then val_type := ''string''; elsif _value is of (smallint, integer, bigint, numeric, boolean) then val_type := ''numeric'';

Re: PG14: "is of" vs pg_typeof

2022-04-23 Thread Karsten Hilbert
Am Sat, Apr 23, 2022 at 10:14:03PM +0200 schrieb Karsten Hilbert: > I can't find anything in the changelog saying that "is of" > was removed. For what it's worth, nothing in the docs ever > said it existed either (though it did, as per real life). Oh, wait,

Re: PG14: "is of" vs pg_typeof

2022-04-23 Thread Karsten Hilbert
Am Sat, Apr 23, 2022 at 01:43:52PM -0700 schrieb Adrian Klaver: > > select pg_typeof('a'::text) = any(ARRAY[pg_typeof(''::text), > > pg_typeof(''::name)]); > > > >Is there anything obvious I am missing for easily > >resurrecting the above "is of" use ? > > Actually it can be done as: > > sele

Aw: How to set password in psql -h -d -U command line?

2022-04-28 Thread Karsten Hilbert
> I tried various ways to set password in psql command line, but got no luck. Have you tried all the methods that you showed in your mail or did you try others as well ? Best regards, Karsten

Re: lifetime of the old CTID

2022-07-06 Thread Karsten Hilbert
Am Wed, Jul 06, 2022 at 08:18:42AM +0200 schrieb Matthias Apitz: > > On first glance, it appears that you are using the ctid as a primary key > > for a row, and that's highly not-recommended. The ctid is never intended > > to be stable in the database, as you have discovered. There are really

Re: lifetime of the old CTID

2022-07-06 Thread Karsten Hilbert
Am Wed, Jul 06, 2022 at 08:41:58AM +0200 schrieb Laurenz Albe: > Using the primary key is the proper solution. To be safe from concurrent > modifications, use a logic like in this pseudo-code: > > FOR b IN SELECT pk, other_columns FROM books WHERE condition >UPDATE books SET ... WHERE pk = ..

Re: lifetime of the old CTID

2022-07-06 Thread Karsten Hilbert
> Said this, we can end this thread. Re-think the data model is not an > option. Why not ? - add a primary key to each table, say db01buch.pk - rename tables, say db01buch -> db01buch__real_table - add views, say db01buch over db1buch__real_table with "pk AS ctid" (untest

Re: Concurrent INSERT statements with RETURNING clause resetting SERIAL sequence

2022-07-20 Thread Karsten Hilbert
Am Wed, Jul 20, 2022 at 09:15:29AM + schrieb Sebastien Flaesch: > Thomas, we already have a similar solution. > The idea is to use the native PostgreSQL SERIAL type. Which does not guarantuee gaplessness. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Aw: Re: Surprising results from current_role in a "security invoker" trigger function in a "cascade delete via FK" scenario

2022-08-11 Thread Karsten Hilbert
I'll be happy to make a smaller example. It will, however, need to create users, a database, schemas, and some number of triggers. Because the triggers, their functions, and everything else about them follow a pattern, I can use "format()" and dynamic SQL to generate them. I'll still need those

Aw: Re: toast useless

2022-09-13 Thread Karsten Hilbert
Gesendet: Dienstag, 13. September 2022 um 19:13 Uhr Von: "Ron" An: pgsql-general@lists.postgresql.org Betreff: Re: toast useless On 9/13/22 08:18, Simon Riggs wrote: On Tue, 13 Sept 2022 at 13:29, Marcos Pegoraro wrote: What problem do they cause you? They don't cause any problem, I wa

Re: Is it possible to stop sessions killing eachother when they all authorize as the same role?

2022-09-14 Thread Karsten Hilbert
Am Tue, Sep 13, 2022 at 05:10:58PM -0400 schrieb Tom Lane: > (I recall that somewhere we have some code that warns about no-op > grants. I wonder if issuing a warning for no-op revokes would be > helpful.) Surely, in the light of security a no-op revoke is potentially more dangerous than a no-op

Re: Is it possible to stop sessions killing eachother when they all authorize as the same role?

2022-09-14 Thread Karsten Hilbert
Am Wed, Sep 14, 2022 at 10:10:30AM +0200 schrieb Karsten Hilbert: > Am Tue, Sep 13, 2022 at 05:10:58PM -0400 schrieb Tom Lane: > > > (I recall that somewhere we have some code that warns about no-op > > grants. I wonder if issuing a warning for no-op revokes would be > >

Aw: Re: I slipped up so that no existing role allows connection. Is rescue possible?

2022-09-20 Thread Karsten Hilbert
> Yes, after Tom's hint, a search for "single-user" took me to that page. But, > beginner as I am, > I didn't know that single-user mode was the thing that I needed. I need a > remedial class. > Something like "PostgreSQL for those whose mental model has been conditioned > by decades of working

Aw: Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

2022-10-06 Thread Karsten Hilbert
What we deal with in our ordinary professional work is SQL texts, program source texts, within these, SQL identifier texts, and then the conventional display of the results of SQL and program execution. To emphasize the point about resulst display, try "\d s.*" in "\t off" mode. You'll see thi

Aw: Re: How to store "blobs" efficiently for small and large sizes, with random access

2022-10-20 Thread Karsten Hilbert
> I don't know what exactly they are, but I suspect that they are just > files (segments?) in Oracle's "file system" (tablespaces/datafiles). > So pretty much what we recommend. Maybe so, but if those large segments are presented "seamlessly" in the form of a table integrated with PGs access/secur

Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should

2022-10-30 Thread Karsten Hilbert
Am Sat, Oct 29, 2022 at 08:20:50PM -0700 schrieb Bryn Llewellyn: > For the purpose of the tests that follow, I set up the O/S users "bob" and > "mary" so that "id bob mary postgres" shows this: > > id=1002(bob) gid=1001(postgres) groups=1001(postgres) > uid=1003(mary) gid=1001(postgres)

Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should

2022-10-30 Thread Karsten Hilbert
Am Sat, Oct 29, 2022 at 09:15:08PM -0700 schrieb Adrian Klaver: > >*# MAPNAME    SYSTEM-USERNAME   PG-USERNAME* > >*# ---    ---   --- > >   bllewell   mary              mary > >* > > > > > >As has been said numerous times, it is utterly pointless to define

Aw: Re: Putting the O/S user for "local" "peer" authentication in the "postgres" group vs chmod'ing the "pg*.conf" files to be readable by "all"

2022-11-01 Thread Karsten Hilbert
> The client user should *never* read the PostgreSQL configuration files, so if > changing > the permissions (which you should *never* do) has an effect, you must be > doing something > very strange, like trying to start the database server with the wrong user. It smells of trying to *embed* Pos

Aw: Information to CVE-2022-42889

2022-11-08 Thread Karsten Hilbert
> the german bureau for IT-Security "BSI" (Bundesamt für Sicherheit in der > Informationstechnik) has issued a warning for CVE CVE-2022-42889 with the > name commons-text. Insurance companies are obliged to analyse the installed > software for vulnerabilities of this type. As the Barmenia is usi

Q: documentation improvement re collation version mismatch

2022-11-09 Thread Karsten Hilbert
Dear all, regarding changed collation versions this https://www.postgresql.org/docs/devel/sql-altercollation.html says: The following query can be used to identify all collations in the current database that need to be refreshed and the objects that depend on the

Aw: Re: Q: documentation improvement re collation version mismatch

2022-11-10 Thread Karsten Hilbert
Thanks, Julien, for your explanation. > > regarding changed collation versions this > > > > https://www.postgresql.org/docs/devel/sql-altercollation.html > > > > says: > > > > The following query can be used to identify all > > collations in the current database that need to be > >

Aw: Re: Q: documentation improvement re collation version mismatch

2022-11-10 Thread Karsten Hilbert
> > The comment above the query in the official documentation is rather > > assertive > > (even if may true to the letter) and may warrant some more cautionary > > wording ? Added, perhaps, some variation of this: > > > > > For now, the only safe way to go is either reindex everything, or > > >

Q: fixing collation version mismatches

2022-11-13 Thread Karsten Hilbert
Dear all, just to confirm my understanding: Is it correct to say that the following sequence will "fix" all current collation version issues in a given database ? REINDEX DATABASE db_in_question; ALTER DATABASE db_in_question REFRESH COLLATION VERSION; ALTER COLLATION eve

Re: Q: fixing collation version mismatches

2022-11-13 Thread Karsten Hilbert
Am Sun, Nov 13, 2022 at 12:46:53PM -0800 schrieb Christophe Pettus: > > On Nov 13, 2022, at 12:45, Karsten Hilbert wrote: > > REINDEX DATABASE db_in_question; > > ALTER DATABASE db_in_question REFRESH COLLATION VERSION; > > ALTER COLLATION every_collation_f

Re: Q: fixing collation version mismatches

2022-11-14 Thread Karsten Hilbert
Am Mon, Nov 14, 2022 at 05:42:16PM +0100 schrieb Daniel Verite: > > Which is why my question still stands: does the above > > three-strikes operation safely take care of any collation > > issues that may currently exist in a database ? > > For the indexes, yes, but theorically, all constraints inv

Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...

2022-11-23 Thread Karsten Hilbert
Am Tue, Nov 22, 2022 at 11:59:59PM -0500 schrieb Kirk Wolak: > > It's OK to post a work-in-progress patch to pgsql-hackers, even if it > > doesn't work right yet. With any luck, people will show up to help > > with problems. I am 100% sure that our Windows user community would > > love this feat

Aw: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-03 Thread Karsten Hilbert
> You would need to wrap the function creation calls into some automation to > generate and store those diffs, comparing it back, etc, but that may be > doable. I would also generate new diffs right after major version updates of > the database (a before and after of the output of pg_get_functio

Q: error on updating collation version information

2022-12-04 Thread Karsten Hilbert
Dear all, following an ICU upgrade, collations in a stock Debian PG 15.1 cluster now have divergent version information in pg_collations. Now gnumed_v22=> ALTER COLLATION pg_catalog."br_FR@euro" REFRESH VERSION; ERROR: collation "pg_catalog.br_FR@euro" for encoding "UTF8" does n

Re: Q: error on updating collation version information

2022-12-04 Thread Karsten Hilbert
Am Sun, Dec 04, 2022 at 01:22:02PM +0100 schrieb Karsten Hilbert: > gnumed_v22=> ALTER COLLATION pg_catalog."br_FR@euro" REFRESH VERSION; > ERROR: collation "pg_catalog.br_FR@euro" for encoding "UTF8" does not > exist The OS (libc) does see

Re: Q: error on updating collation version information

2022-12-04 Thread Karsten Hilbert
Am Sun, Dec 04, 2022 at 01:22:02PM +0100 schrieb Karsten Hilbert: > following an ICU upgrade, collations in a stock Debian PG 15.1 > cluster now have divergent version information in pg_collations. Correction: this is following a libc upgrade 2.35 -> 2.36 Karsten -- GPG 40BE 5B0E

Re: Q: error on updating collation version information

2022-12-04 Thread Karsten Hilbert
Am Sun, Dec 04, 2022 at 10:09:47AM -0800 schrieb Adrian Klaver: > >>following an ICU upgrade, collations in a stock Debian PG 15.1 > >>cluster now have divergent version information in pg_collations. > > > >Correction: this is following a libc upgrade 2.35 -> 2.36 > > So to be clear this database

Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

2022-12-04 Thread Karsten Hilbert
Am Sun, Dec 04, 2022 at 06:05:30PM +0100 schrieb Alban Hertroys: > > I mean, pg_get_functiondef output being a server runtime artifact it might > > well change between server versions, no ? > > I meant to write: “I would also generate new diffs right > _before and_ after…”, precisely for that reas

Re: Q: error on updating collation version information

2022-12-04 Thread Karsten Hilbert
Is this to be expected ? PG 15.1 on Debian: gnumed_v22=# select *, pg_collation_actual_version(oid), pg_encoding_to_char(collencoding) from pg_collation where collname = 'zh_TW'; -[ RECORD 1 ]---+ oid | 12985 collnam

Re: plpgsql_check_function issue after upgrade

2022-12-05 Thread Karsten Hilbert
Am Mon, Dec 05, 2022 at 03:54:28PM +0530 schrieb shashidhar Reddy: > Is there any way to get the older version 1.1 of plpgsql_check to install > it? Is there any way to get you to respect the kind requests to follow this list's posting customs as expressed by the very people you want to help you

dropped default locale

2022-12-21 Thread Karsten Hilbert
Dear all, I managed to drop the "special" collations default, C, and POSIX with OIDs 100, 950, 951. Is there a way to recreate them (short of restoring a backup) ? Naive attempts with create collation do not seem to work out. Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F

Re: dropped default locale

2022-12-21 Thread Karsten Hilbert
Am Wed, Dec 21, 2022 at 03:41:24PM +0100 schrieb Laurenz Albe: > I would definitely go for the backup, but here is how you can > create these three rows in PostgreSQL v15: > > INSERT INTO pg_collation > (oid, collname, collnamespace, collowner, collprovider, > collisdeterministic, colle

Re: dropped default locale

2022-12-21 Thread Karsten Hilbert
Am Wed, Dec 21, 2022 at 03:46:48PM +0100 schrieb Karsten Hilbert: > I wasn't so sure whether inserting appropriate > rows would be equivalent to create collation... For that matter, is DELETE FROM pg_collation ... equivalent to DROP COLLATION ? Thanks, Karsten -- GPG 40BE 5B0E C98

Aw: Re: REINDEX vs VACUUM

2023-01-05 Thread Karsten Hilbert
> Von: "Peter J. Holzer" > On 2023-01-04 09:34:42 -0600, Ron wrote: > > I don't think VACUUM FULL (copy the table, create new indices and other > > metadata all in one command) actually vacuums tables.  It's a misleading > > name. > > Move all the stuff from the living room to the bedroom and the

Aw: Re: Thanks! Re: Who adds the "start transaction" and "commit" to the intended SQL statement in "autocommit" mode?

2023-02-21 Thread Karsten Hilbert
> >> b...@yugabyte.com wrote: > >> > >> I’ve no idea how I might have found this without human help. > > > > x...@thebuild.com wrote: > > > > That sounds like an excellent documentation patch! > > Well, it’s already documented clearly enough. The question is how to find > it—especially if you

Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-10 Thread Karsten Hilbert
Am Mon, Apr 10, 2023 at 09:41:15AM +0200 schrieb Francisco Olarte: > On Mon, 10 Apr 2023 at 04:16, Rob Sargent wrote: > > > An UPSERT checks whether a row exists, if so, it does an update, if not > > > it does an insert. This is the literal definition. > > This the part that's always eluded me:

Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-10 Thread Karsten Hilbert
Am Mon, Apr 10, 2023 at 01:33:41PM +0200 schrieb Francisco Olarte: > > > > This the part that's always eluded me: How does the client, the > > > > UPSERTer, come to hold an id and not know whether or not it's already in > > > > the database. > > > > > > This is extremely easy to do if you have nat

Re: Guidance on INSERT RETURNING order

2023-04-14 Thread Karsten Hilbert
Am Fri, Apr 14, 2023 at 10:44:19PM +0100 schrieb John Howroyd: > The problem is that SQLAlchemy is an ORM [...] ... > [...] as the majority of the python world will use this ORM for > their database needs. I wouldn't be so sure on this count ... Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BE

backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
Dear list members ! I am running this delete statement via psql DELETE FROM ref.auto_hint WHERE title = 'Kontraindikation: ACE/Sartan <-> Schwangerschaft'; against a name| server_version setting | 11.0 (Debian 11.0-1) postgres@hermes:~$ psql

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
> I am running this delete statement via psql > > DELETE FROM ref.auto_hint WHERE title = 'Kontraindikation: ACE/Sartan > <-> Schwangerschaft'; > > and it crashes the backend it is running on. For what it is worth I have identified the physical file gnumed_v21=# select pg_relati

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
On Thu, Nov 01, 2018 at 03:42:57PM +0100, Karsten Hilbert wrote: > Will attempt to get a stack trace ... Meanwhile, in case it helps, an strace of the crash. epoll_wait(7, [{EPOLLIN, {u32=47607120, u64=35184419695952}}], 1, -1) = 1 recv(13, "Q\0\0\0`DELETE FROM ref.aut

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
On Thu, Nov 01, 2018 at 04:11:33PM +0100, Karsten Hilbert wrote: >> Will attempt to get a stack trace ... Eventually, the stack trace (attached). Thanks for insights, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B Script started on 2018-11-01 16:16:02+01:00 root@

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
On Thu, Nov 01, 2018 at 12:27:23PM -0300, Alvaro Herrera wrote: > In general terms, this bug report would have been more actionable if you > had shown the definition of the tables involved right from the start. Sorry for that, will supply. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC8

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
On Thu, Nov 01, 2018 at 12:27:23PM -0300, Alvaro Herrera wrote: > Ah, now this is interesting. Can you please supply the definition of > the table? Attached. > I'm wondering if there is a partitioned table with an FK to > this one. There is. Both ref.auto_hint and clin.suppressed_hint are usin

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
On Thu, Nov 01, 2018 at 12:27:23PM -0300, Alvaro Herrera wrote: > > Program received signal SIGSEGV, Segmentation fault. > > heap_attisnull (tup=0x0, attnum=5, tupleDesc=0xb2990ef4) at > > ./build/../src/backend/access/common/heaptuple.c:403 > > 403 ./build/../src/backend/access/common/heaptuple.

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
On Thu, Nov 01, 2018 at 11:43:56AM -0400, Tom Lane wrote: > Alvaro Herrera writes: > > Ah, now this is interesting. Can you please supply the definition of > > the table? I'm wondering if there is a partitioned table with an FK to > > this one. I'm not quite seeing how come 'tup' is NULL there

Re: backend crash on DELETE, reproducible locally

2018-11-03 Thread Karsten Hilbert
On Fri, Nov 02, 2018 at 11:56:58PM -0400, Tom Lane wrote: > > On Thu, Nov 01, 2018 at 11:43:56AM -0400, Tom Lane wrote: > >> Yeah, apparently we've passed a null OLD tuple to an RI_FKey_cascade_del > >> trigger, which surely shouldn't happen. It'd be interesting to look at > >> the set of trigger

Re: backend crash on DELETE, reproducible locally

2018-11-03 Thread Karsten Hilbert
On Sat, Nov 03, 2018 at 11:39:49AM -0400, Tom Lane wrote: > Karsten Hilbert writes: > > On Fri, Nov 02, 2018 at 11:56:58PM -0400, Tom Lane wrote: > >> I was feeling baffled about this, but it suddenly occurs to me that maybe > >> the bug fixed in 040a1df61/372102b81

FIXED: backend crash on DELETE, reproducible locally

2018-11-09 Thread Karsten Hilbert
For the record: Regarding backend crash when DELETEing tuples older than a recent ALTER TABLE ADD COLUMN: > > > On Fri, Nov 02, 2018 at 11:56:58PM -0400, Tom Lane wrote: > > >> I was feeling baffled about this, but it suddenly occurs to me that maybe > > >> the bug fixed in 040a1df61/372102b81 ex

Re: Does PostgreSQL use atomic file creation of FS?

2018-12-12 Thread Karsten Hilbert
On Wed, Dec 12, 2018 at 02:48:12PM +0300, Dmitry Lazurkin wrote: > Does PostgreSQL use atomic file creation on FS? How does PostgreSQL > catch situation when system crashes between open call and write call? I > am interesting in this because I would like use PostgreSQL on network > file system. I

multi-SQL command string aborts despite IF EXISTS

2019-01-28 Thread Karsten Hilbert
Hello all, the Orthanc DICOM server tries to create a trigram index using this code: db->Execute( "CREATE EXTENSION IF NOT EXISTS pg_trgm; " "CREATE INDEX DicomIdentifiersIndexValues2 ON DicomIdentifiers USING gin(value gin_trgm_ops);"); which results in this s

Re: multi-SQL command string aborts despite IF EXISTS

2019-01-28 Thread Karsten Hilbert
On Mon, Jan 28, 2019 at 03:17:47PM +0100, Laurenz Albe wrote: > > Now, I would have thought that the "IF NOT EXISTS" part of > > the CREATE EXTENSION would have allowed the subsequent CREATE > > INDEX to succeed. > > > > I am wrong ? > > No, you are right. > > The "pg_trgm" extension does *not*

Re: Methods to quickly spin up copies of an existing databases

2019-03-02 Thread Karsten Hilbert
On Fri, Mar 01, 2019 at 04:51:32PM -0500, Arjun Ranade wrote: > Pre-copying is not really an option since we could potentially need 1-X > instances so it needs to be scalable. Would it work to have a PG instance with a ready-to-use cluster/DB inside a VM, and make a copy of that as needed ? The

Re: Where to store Blobs?

2019-03-13 Thread Karsten Hilbert
On Wed, Mar 13, 2019 at 11:50:37AM -0400, Christopher Browne wrote: >> I guess most people do not store Blobs in PostgresSQL. - BYTEA puts practical limits on size - LO storage happens inside the system (!) table Nowadays, there are Foreign Data Wrappers which might encapsulate files as if they

Re: s3 was: Where to store Blobs?

2019-03-18 Thread Karsten Hilbert
stgresql.org/wiki/BinaryFilesInDB Karsten Hilbert -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Aw: Re: Key encryption and relational integrity

2019-03-28 Thread Karsten Hilbert
> Yes, but to be GDPR compliant I _have_ to remove that link. As you > reported in an earlier email, they say that you can't link patient and > medication if not with an external resource. In this case we are linking > them without an external resource I REALLY doubt that. I believe you when

Aw: Re: Key encryption and relational integrity

2019-03-28 Thread Karsten Hilbert
> I believe you when you say "they say that ..." but I truly doubt that > GDPR intended to make data processing fully impractical. > > (I work in the medical field) In Germany, that is, which usually takes things to the extreme, for better or worse. Karsten

  1   2   3   >