An application (which we can’t change) is accessing some Postgres table, and we
would like to record when the rows in that table were last read (meaning:
appeared in a SELECT result). The ultimate goal would be that we can „age out“
rows which have not been accessed in a certain period of time.
On Tue, 2025-12-16 at 21:49 -0800, Igor Korot wrote:
> I just tried the following code:
>
> [code]
> std::wstring query1 = L"SELECT t.table_catalog AS catalog,
> t.table_schema AS schema, t.table_name AS table, u.usename AS owner,
> c.oid AS table_id FROM information_schema.tables t,
> pg_cata
On Tue, 2025-12-16 at 21:53 -0800, Igor Korot wrote:
> Is there some default value for client_encoding?
The default value for a client connection is whatever the parameter
"client_encoding" was set to in the PostgreSQL server configuration.
But that value can be overridden in several ways:
- exp
Thx, Tom..
Is there some default value for client_encoding?
Thank you.
On Tue, Dec 16, 2025 at 7:08 PM Tom Lane wrote:
>
> Igor Korot writes:
> > If I want to have strings (aka char *) as parameters fr the query,
> > should I send UTF-8 strings or something else?
>
> They should be in whatever
Hi, ALL,
On the page https://www.postgresql.org/docs/current/libpq-example.html
in the first program there is a following comment:
[code]
/*
* Our test case here involves using a cursor, for which we must be inside
* a transaction block. We could do the whole thing with a single
*
Hi, ALL,
On Sun, Aug 27, 2017 at 11:05 PM Michael Paquier
wrote:
>
> On Sun, Aug 27, 2017 at 12:12 AM, Tom Lane wrote:
> > Michael Paquier writes:
> >> On Fri, Aug 25, 2017 at 8:10 AM, Tom Lane wrote:
> >>> I think the real problem occurs where we realloc the array bigger.
> >
> >> Looking at
Igor Korot writes:
> If I want to have strings (aka char *) as parameters fr the query,
> should I send UTF-8 strings or something else?
They should be in whatever is selected as the client_encoding
on your connection. That goes for query strings too, and whatever
other text a client might send.
Hi, ALL,
If I want to have strings (aka char *) as parameters fr the query,
should I send UTF-8 strings or something else?
Thank you.
Greg Sabino Mullane wrote:
> As I said, I'm trying to solve them in a single statement. Recursive CTEs,
> CASE, and creative use of JSON can get you a long way. Here's my day 7, which
> runs slow compared to other languages, but runs as a single SQL statement and
> no plpgsql, and I think is a
On Tue, Dec 16, 2025 at 7:59 AM Bernice Southey
wrote:
> Greg Sabino Mullane wrote:
> > What's so wrong with brute force? :)
> Yeah, a few more days of AoC changed my mind.
>
Doing things in SQL and/or plpgsql definitely presents a lot of challenges,
especially in comparison to a "regular" prog
Greg Sabino Mullane wrote:
> What's so wrong with brute force? :)
Yeah, a few more days of AoC changed my mind.
> In case it helps, here is my solution:
Thank you, this is very clever! I tried something similar, but with
updating the circuit in my table on every loop. It ran a couple of
minutes j
11 matches
Mail list logo