plphyton function - return each list value as a row ?

2020-07-25 Thread karsten
GetEartquakeAll function: select GetEartquakeAll('2020-01-01' ,'2020-03-01', -120, 40,200, 1.7) gives me ERROR: length of returned sequence did not match number of columns in row How can I 'simply' return each list value as a row ? Thanks Karsten Venneman

RE: plphyton function - return each list value as a row ?

2020-07-25 Thread karsten
Answering my own question I got it to work by a tiny change add SETOF for the return definition: Cheers Karsten ... RETURNS SETOF equake_values AS $$ ... -Original Message- From: karsten [mailto:kars...@terragis.net] Sent: Saturday, July 25, 2020 14:42 To: pgsql-general

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

2018-05-03 Thread Karsten Hilbert
be > extremely grateful. This is the closest I found with a quick searc http://snapshot.debian.org/archive/debian/20170831T163230Z/pool/main/p/postgresql-9.6/postgresql-9.6-dbg_9.6.5-1_amd64.deb Not sure this is close enough though. Karsten --

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Karsten Hilbert
rs timestamp-withOUT-timezone to the outside. Then force read access via the view. Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Karsten Hilbert
fied" to mean "TimeZone value"). But, then, OP could always force TimeZone to UTC on his servers :-) Karsten --

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Karsten Hilbert
t one particular database may have to offer over and above basic SQL for solving a particular problem. Karsten --

Re: Code of Conduct plan

2018-09-14 Thread Karsten Hilbert
n the postgresql.org > infrastructure. In the case where a dispute of such a nature occurs > outside said infrastructure, if other parties are unable to act, this code > of conduct may be considered where it is, on the balance, in the interest > of the global community to do so." &

Re: Code of Conduct plan

2018-09-15 Thread Karsten Hilbert
mselves. And often it will be extremely hard to *codify* such working definitions to even remotely the same degree of success. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: PostgreSQL 11 and security

2018-10-19 Thread Karsten Hilbert
t; And then, bugs have been fixed, the security implications of which are not necessarily fully known. Other than that, your question may need to become more specific. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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

2019-08-24 Thread Karsten Hilbert
finity'::timestamptz; -[ RECORD 1 ]- timestamptz | infinity gnumed_v22=> is the highest timestamp. (You *can* count the horses in *your* corral but there's always more of them elsewhere ;-) Just so you are aware. Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
how be kept in sync). Might crafty use of server side COPY TO ... PROGRAM ... enable OP to drop in dictionary data files as needed ? Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Encoding/collation question

2019-12-12 Thread Karsten Hilbert
h, we support it, it's been in use a long time, it should work, but, nah, one doesn't really want to choose it over UTF8 if at all possible, or at least know *exactly* what one is doing and BTW YMMV ? Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Encoding/collation question

2019-12-18 Thread Karsten Hilbert
n to use when "technical" sorting is required (say, when uniqueness does not depend on the notion of culturally equivalent characters). > It's actually all the *other* collations where you should worry about > their behavior being a moving target :-(. But then that is to be expe

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

2020-03-15 Thread Karsten Hilbert
judicious use of COPY-FROM-with-subselect from blobs.doc_obj restore dance ? Many thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
curs no > TOAST costs if none of the out-of-line values change." However, where is the fault in my thinking ? -> An UPDATE actually *would* change the TOASTed BYTEA field (which is corrupt). I had hoped that the DELETE would NOT have to touch the TOAST table at all (and thereby not

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

2020-03-15 Thread Karsten Hilbert
hanks for reminding. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
hing else >RAISE NOTICE 'failed to return data'; >END; > END LOOP; > END > $$ > > should work. You can call it like > SELECT (salvaged_rec.rec).* FROM (SELECT salvaged_text::salvage_me FROM > salvage('salvage_me') AS salvaged_t

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

2020-05-12 Thread Karsten Hilbert
of Foo Cottage". LAT/LON ? https://plus.codes/ ? Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Strategy for materialisation and centralisation of data

2020-05-21 Thread Karsten Hilbert
b type database belongs to > 0 or 1 organisations. Might postgres_fdw help in any way ? Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Strategy for materialisation and centralisation of data

2020-05-21 Thread Karsten Hilbert
ill would not be entirely surprised if testing were to reveal something different. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Suggestion to Monitoring Tool

2020-05-27 Thread Karsten Hilbert
he Monitoring Tool based on your experience. I suggest you read up on the fine manual first. It covers a lot of ground already. And to stick to one major project at a time. Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Linux Update Experience

2020-05-28 Thread Karsten Hilbert
it that updating "more frequently" (not "accruing technical debt") helps -- the trick is to find the balance between early effort and lag. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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,

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
to restore, we don't have any > option apart from data directory(no wal files) At this point you are very likely in need of (highly) specialized professional help. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Extension vs Implementing Wire Protocol

2020-07-20 Thread Karsten Hilbert
on: > > https://postgresql-anonymizer.readthedocs.io/en/latest/ or https://github.com/marcmunro/veil Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
se a different COLLATE clause. For > Postgres there is not any other way. One might use a function producing a SELECT taking the locale as a parameter. Or views in schemas per locale. Selecting the search path per locale pulls in the right view. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Set COLLATE on a session level

2020-11-30 Thread Karsten Hilbert
et session "mika.current_locale" = 'locale@2_use'; and use select current_setting('mika.current_locale') as needed inside the view definition > This all seems unnecessarily complicated to me. No one said it is going to be particularly convenient... You

Aw: Re: Set COLLATE on a session level

2020-12-05 Thread Karsten Hilbert
d in the view, just like column names or table names. > I don't see how you could use the setting to control the COLLATE clause > through a view. The view might produce its rows by calling a function which in turn reads the setting and dynamically constructs and exexcutes the query needed to produce the locale-dependant rows, no ? =8-) Convoluted ? I guess so ... Karsten

Aw: Re: Set COLLATE on a session level

2020-12-05 Thread Karsten Hilbert
the business of timekeeping the worklife of people so I guess sorting might matter there. Karsten

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 ?

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

2021-01-08 Thread Karsten Hilbert
sure that analogy holds up. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: count(*) vs count(id)

2021-02-03 Thread Karsten Hilbert
and it seems to > be choosing one of smaller size which leads to less IO and hence returns > the result faster. Would you mind throwing in a test for select count(1) ... ? Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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

2021-03-02 Thread Karsten Hilbert
numed/gnumed/server/sql Karsten

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

2022-04-02 Thread Karsten Hilbert
> How long does iteration over 4-5 million rows usually take? > > 4-5 million times as long as it takes to do one iteration ( if you’re doing > it correctly) I may not take quite that long because setup/teardown times might not be needed for each iteration. Best, Karsten

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

PG14: "is of" vs pg_typeof

2022-04-23 Thread Karsten Hilbert
so far: it requires laboriously constructing an array on the right hand side for the above use case, along the lines of: 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 ? Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
cting the above "is of" use ? > > Actually it can be done as: > > select pg_typeof('test'::text) in ('text'::regtype, 'varchar'::regtype); Found that, but thanks anyway. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
rimary key, not to *add* one. You said that there *is* a primary key. So, more thought/explanation would need to go into why that cannot be used. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: lifetime of the old CTID

2022-07-06 Thread Karsten Hilbert
not having changed might be another solution for detecting concurrent transacations if one is bent on using system columns for that. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: lifetime of the old CTID

2022-07-06 Thread Karsten Hilbert
uot;pk AS ctid" (untested, however) Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
ht. After all, how would I know which of the eight to skip while I don't know the intended rules for the current_role? = You'd certainly start out with all eight but then whittle down to what still exhibits the problem and post that. = Karsten  

Aw: Re: toast useless

2022-09-13 Thread Karsten Hilbert
l?   Essential to proper operation of the database code as of now.   Best, Karsten

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

2022-09-14 Thread Karsten Hilbert
than a no-op grant. Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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, one will forget most of what's written there. However, a coarse structure of a new mental model will form. Karsten

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

2022-10-06 Thread Karsten Hilbert
there's no such table. And, indeed, there isn't. Perhaps there's a table s."silly name". It is accidental if unfortunate that the is quoted with ""'s in the \d output... Karsten  

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

2022-10-20 Thread Karsten Hilbert
m of a table integrated with PGs access/security infrastructure that would be really helpful for some scenarios. A view-on-top-of-file_fdw kind of thing ? LO seems to nearly be there by now, or am I misunderstanding ? Karsten

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
> > bob || {} > mary || {} > postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {} Just a hint: you may want to use "mary_os" and "mary_db&

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
uccessful login) should not change (mary is still mary). despite the additional code path. It seems to be a way of bisecting in order to verify/falsify assumptions in his mental model. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
rying to *embed* PostgreSQL ? But that would not go with the account of multi-tenancy that's been presented. Karsten

Aw: Information to CVE-2022-42889

2022-11-08 Thread Karsten Hilbert
t for short-term feedback. It might be prudent for Barmenia, a large insurance company, to consider purchasing commercial support rather than requesting short-term feedback from volunteers. Other than that there's also excellent documentation and freely inspectable source code. Best regards, Karsten

Q: documentation improvement re collation version mismatch

2022-11-09 Thread Karsten Hilbert
"Note: you may need to refresh the default collation even if the query above does not show any objects directly affected by a collation version change" ? Thanks for considering. Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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

2022-11-10 Thread Karsten Hilbert
ntation 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 everything > except some safe cases (non-partial indexes on plain-non-collatable datatypes > only). Best, Karsten

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

2022-11-10 Thread Karsten Hilbert
sion and the currently reported one unless you REALLY know what you're > doing." Given that it does not seem straightforward to mechanically detect objects in need of a collation-associated rebuild I would think that such a warning would change matters for the better, documentation-wise. Karsten

Q: fixing collation version mismatches

2022-11-13 Thread Karsten Hilbert
COLLATION every_collation_from_pg_collation REFRESH VERSION; Note that I am currently _not_ concerned with minimizing work by running this on objects only that really need a reindex/refresh. Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
all this has been discussed in detail, I'd be glad for a pointer into the archive. Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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

2022-11-23 Thread Karsten Hilbert
realize... That's a > great idea. > Honestly not sure how to even run it? > > Thanks for the support, it's encouraging... especially when I know there's > an 80% chance that > this may fail to get accepted for any number of reasons. I don't think that estimate n

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

2022-12-03 Thread Karsten Hilbert
he output of pg_get_functiondef, applied > to the stored diff?). I wonder whether that would tie the sanity check to a particular PG version. I mean, pg_get_functiondef output being a server runtime artifact it might well change between server versions, no ? Best, Karsten

Q: error on updating collation version information

2022-12-04 Thread Karsten Hilbert
n my database(s). What is the canonical advice on the way forward here ? Is the _suggested_ solution to delete the collation or am I missing to see the "proper" approach to fixing it ? Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
p (the "reindex / revalidate constraint / refresh collation version" dance). There also was a libc upgrade which also affected locales. Most of them were fixable by that dance but some popped up (such as br_FR@euro) to not be "correctable" showing the "does not exist for encoding" error. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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

2022-12-04 Thread Karsten Hilbert
”, precisely for that reason. I see. That makes sense. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Q: error on updating collation version information

2022-12-04 Thread Karsten Hilbert
W.euctw" will be ignored by the server for all practical purposes. Does this mean it is impossible to "correct" its version information ? And if so, that is expected to be non-harmful and is not expected to trigger nag messages ? Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: plpgsql_check_function issue after upgrade

2022-12-05 Thread Karsten Hilbert
to help you ? Such as not to top post. Best regards, Karsten > On Mon, 5 Dec, 2022, 1:36 pm Pavel Stehule, wrote: > > > > > > > po 5. 12. 2022 v 8:42 odesílatel shashidhar Reddy < > > shashidharreddy...@gmail.com> napsal: > > > >> Pavel,

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

Re: dropped default locale

2022-12-21 Thread Karsten Hilbert
#x27;c', TRUE, -1, 'POSIX', 'POSIX'); Many thanks ! I wasn't so sure whether inserting appropriate rows would be equivalent to create collation... (pg_collation might have been a view projecting inner workings of the server engine). Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
the stuff from the living room to the bedroom and then jettison > the living room. > > Isn't that how you normally vacuum your living room? Well, yeah, I wouldn't expect the table to be *copied*. After all, there's not that much use for more than one per living room. Karsten

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
here to be read. And it tends to be the longer the more details it is expected to cover, isn't it ? Searching for generic terms on typical search engines can be quite a task, agreed. Karsten

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

2023-04-10 Thread Karsten Hilbert
the last incoming call timestamp for a > phone number will be exactly that. timezones ? DST ? spoofing ? ... Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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

2023-04-10 Thread Karsten Hilbert
l) PK with respect to a given time line only, right? > > spoofing ? > > ¿ Of what ? The time stamp. But then I assume that is obtained on the logging system. All I really wanted to hint at is that "incoming call timestamp" may work pretty well in given settings but does not _always_ make for a "unique enough" key. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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 1

backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
bers: GNUmed uses psycopg2 for upgrades and its databases default to default_transaction_read_only=true but I have taken both aspects out of the loop manually for the above test.) Thanks for any hints, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
s ask for a physical write test ?). Attached the output of pg_filedump which, to me, doesn't seem to show anything out of the ordinary either. Corrupt index should not be the case because the databse is REINDEXed during the upgrade process before the failing statement. Will attempt to get a st

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 5BC

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
trigdata' in frame 2? Sure, how ? :-) (I can surely type "print trigdata" but does that already auto-select from "frame 2" ?) Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B Ausgabeformat ist »wrapped«.

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
all ? (gdb) frame 2 #2 0x00879bf7 in RI_FKey_cascade_del (fcinfo=0xbfbda9e4) at ./build/../src/backend/utils/adt/ri_triggers.c:917 917 ./build/../src/backend/utils/adt/ri_triggers.c: Datei oder Verzeichnis nicht gefunden. (gdb) print trigdata $1 = (TriggerData *) 0xbfbdaca4 It is from another run, however. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: backend crash on DELETE, reproducible locally

2018-11-01 Thread Karsten Hilbert
|| (5 Zeilen) BTW, do you want me to attach text files or include into the body (potential wrapping issues on display) ? Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: backend crash on DELETE, reproducible locally

2018-11-03 Thread Karsten Hilbert
ollback; the expected segfault does indeed occur. Conversely, moving the offending DELETE FROM ref.auto_hint WHERE title = 'Kontraindikation: ACE/Sartan <-> Schwangerschaft'; to right before the ALTER TABLEs makes the full upgrade run through without further problems. Looking at 040a1df61/372102b81 feels like it fits the bill. So, I guess I can work around the issue by the above manoeuvre and report back once 040a1df61/372102b81 is released. Anything else you'd want me to look into ? Many thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

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
/var/lib/dpkg/status 11.0-1+b1 990 990 http://httpredir.debian.org/debian buster/main i386 Packages I can report that my issued is fixed by that version. Thanks to all, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Does PostgreSQL use atomic file creation of FS?

2018-12-12 Thread Karsten Hilbert
file system. I doubt we can get more certainty than this: https://www.postgresql.org/docs/devel/creating-cluster.html#CREATING-CLUSTER-NFS Best, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

multi-SQL command string aborts despite IF EXISTS

2019-01-28 Thread Karsten Hilbert
ring ? (Mind you, the code above does not abort the *transaction* but does not execute the second SQL command.) Many thanks for insights, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: multi-SQL command string aborts despite IF EXISTS

2019-01-28 Thread Karsten Hilbert
e right. > > The "pg_trgm" extension does *not* exist in the database, and that is your > problem. Wow, I didn't realize the difference between pg_extension and pg_available_extensions ... > Perhaps you preinstalled the extension in the wrong database (postgres?). It

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

2019-03-02 Thread Karsten Hilbert
? The copies then get thrown away. Same here, pre-copying a bunch of VMs would help. Disk space is (apparently) cheaper than time (for your use case). Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Re: Where to store Blobs?

2019-03-13 Thread Karsten Hilbert
as if they lived inside the database. Also, a combination of COPY TO FORMAT binary pg_read_binary_file() and suitable plpgsql security definer functions might provide for a Poor Man's binary file integrated external storage. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BE

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

  1   2   3   >