Re: COBOL PRECOMPILER for PostGreSQL

2024-01-12 Thread Tom Lane
Chuck Haatvedt writes: > I would like to propose that the ECPG precompiler for C, to be > modified to accept either C or COBOL. Another option would be to > clone ECPG to work with the COBOL language. The latter option seems much more likely to succeed than the former. Either w

COBOL PRECOMPILER for PostGreSQL

2024-01-12 Thread Chuck Haatvedt
Hello, I'm working with the opensource GNUCOBOL project. One of our efforts is to provide a migration path for organizations to move from commercial COBOL compilers to GNUCOBOL. One of the impediments to this migration is to move from an Oracle or IBM

Re: How to redirect output from PostgreSQL pg_recvlogical to a file or a pipe?

2024-01-12 Thread David Ventimiglia
Let me just lay my cards on the table. What I'm really trying to do is capture change events with logical decoding and then send them back into the database into a database table. To do that, I believe I need to process the event records into SQL insert statements somehow. xargs is one option.

Re: How to redirect output from PostgreSQL pg_recvlogical to a file or a pipe?

2024-01-12 Thread Adrian Klaver
On 1/12/24 14:03, David Ventimiglia wrote: Reply to list also. Ccing list Hi Adrian, I left out the creation of the slot both from the SO question and from this mailing list question, because I believe it's a red herring.  I run into the same problem with the default output plugin as I do wit

Re: How to redirect output from PostgreSQL pg_recvlogical to a file or a pipe?

2024-01-12 Thread Francisco Olarte
David: On Fri, 12 Jan 2024 at 20:35, David Ventimiglia wrote: > pg_recvlogical -d postgres --slot test --start -f - >> sample.jsonl > > Lest there be any confusion, I already created the slot in an earlier step. > Moreover, I can verify that if I omit the output redirection >> sample then > it

Re: How to redirect output from PostgreSQL pg_recvlogical to a file or a pipe?

2024-01-12 Thread Adrian Klaver
On 1/12/24 11:34, David Ventimiglia wrote: Hello! How do I redirect logical decoding output from the PostgreSQL CLI tool |pg_recvlogical| either to a file or to another command via a pipe? I ask because when I try the obvious, no output is recorded or sent: |pg_recvlogical -d postgres --slot t

How to redirect output from PostgreSQL pg_recvlogical to a file or a pipe?

2024-01-12 Thread David Ventimiglia
Hello! How do I redirect logical decoding output from the PostgreSQL CLI tool pg_recvlogical either to a file or to another command via a pipe? I ask because when I try the obvious, no output is recorded or sent: pg_recvlogical -d postgres --slot test --start -f - >> sample.jsonl Lest there be

Re: [EXTERNAL]Re: Refresh Materialized View Issue

2024-01-12 Thread Jim Nasby
On 1/12/24 6:34 AM, Jeremiah Bauer wrote: That'd be a band-aid at best, because we know that the query used to define the materialized view runs in a reasonable amount of time on it's own, as does a CTAS. So either the REFRESH is doing something odd when writing into the new rela

Re: Time zone offset in to_char()

2024-01-12 Thread Adrian Klaver
On 1/12/24 02:01, Alban Hertroijs wrote: ciscache=> select ToDatetimeOffset(current_timestamp, 'Europe/Amsterdam'), to_char(current_timestamp, '-MM-DD HH24:MI:SS.US0 TZH:TZM'); ERROR:  invalid value for parameter "TimeZone": "tz_" CONTEXT:  SQL statement "set local timezone to tz_" PL/pgSQ

Re: Support for arm64 windows is absent - Would be nice to have!

2024-01-12 Thread Dominique Devienne
On Fri, Jan 12, 2024 at 6:13 PM David Hussey wrote: > It would be good to have proper support for Windows arm64 architecture. > Hi. Have you seen: https://www.linaro.org/windows-on-arm/postgres/ ? https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28707291320/PostgreSQL ? I just did a quick se

Re: Issue with loading unicode characters with copy command

2024-01-12 Thread Adrian Klaver
On 1/12/24 07:23, Kiran K V wrote: Hi, I have a UTF8 database and simple table with two columns (integer and varchar). Created a csv file with some multibyte characters and trying to perform load operation using the copy command. The multibyte characters come from what character set? __

Re: Time zone offset in to_char()

2024-01-12 Thread Adrian Klaver
On 1/12/24 00:51, Alban Hertroijs wrote: Following up on my own mail from yesterday evening, here's the output that shows the function using set_config 'leaking' the timezone change to outside the function (the first select vs. the 2^nd  select) into the (same) transaction, whereas the functio

Support for arm64 windows is absent - Would be nice to have!

2024-01-12 Thread David Hussey
Hi I’m trying to use PosgreSQL from a Qt application but libpq and ODBC binaries are currently unavailable so I can only use x64 applications at present! It would be good to have proper support for Windows arm64 architecture. At the very least ODBC connectivity, better still to have libpq ava

Software Bill of Materials (SBOM)

2024-01-12 Thread Кристина Валентей
Good afternoon. I'm looking for a way to build sbom files for assembly postgresql, to perform software composition analysis (SCA). Please, tell me how can I do this? Thank you.

Issue with loading unicode characters with copy command

2024-01-12 Thread Kiran K V
Hi, I have a UTF8 database and simple table with two columns (integer and varchar). Created a csv file with some multibyte characters and trying to perform load operation using the copy command. Database info: Postgresql database details: Name| Owner | Encoding | Collate

Re: How much size saved by updating column to NULL ?

2024-01-12 Thread Tom Lane
Ron Johnson writes: > On Fri, Jan 12, 2024 at 7:45 AM Sébastien TANIERE > wrote: >> Do we save 8 bytes by timestamp column updated to NULL or not ? > I don't think the record on the page is rewritten in a more compact form. > Even if it were, the page would just have a small hole in it. > A dif

Re: How much size saved by updating column to NULL ?

2024-01-12 Thread Ron Johnson
On Fri, Jan 12, 2024 at 7:45 AM Sébastien TANIERE wrote: > Hello, > in my company, some columns rarely used in a PG database 14.8 have been > set to NULL in order to save disk space (datecreation & acteurcreation in > following table) . > > create table example > ( > id varchar(

Re: How much size saved by updating column to NULL ?

2024-01-12 Thread David G. Johnston
On Friday, January 12, 2024, Sébastien TANIERE wrote: > Hello, > in my company, some columns rarely used in a PG database 14.8 have been > set to NULL in order to save disk space (datecreation & acteurcreation in > following table) . > > create table example > ( > id varchar(25)

How much size saved by updating column to NULL ?

2024-01-12 Thread Sébastien TANIERE
Hello, in my company, some columns rarely used in a PG database 14.8 have been set to NULL in order to save disk space (datecreation & acteurcreation in following table) . create table example ( id varchar(25) not null, datecreationtimestamp(6), acteurcreation

Re: [EXTERNAL]Re: Refresh Materialized View Issue

2024-01-12 Thread Jeremiah Bauer
That'd be a band-aid at best, because we know that the query used to define the materialized view runs in a reasonable amount of time on it's own, as does a CTAS. So either the REFRESH is doing something odd when writing into the new relation (which looking at the code seems very unlikely), or REF

Re: Time zone offset in to_char()

2024-01-12 Thread Alban Hertroijs
From: Adrian Klaver > I didn’t succeed in calling SET LOCAL TIMEZONE from within the function. > Could be I missed something, then Google (stackoverflow) pointed me to > set_config(). CREATE OR REPLACE FUNCTION public.tz_fnc() RETURNS void LANGUAGE plpgsql AS $function$ BEGIN SET LOCA

Re: Time zone offset in to_char()

2024-01-12 Thread Alban Hertroijs
> set_config ( setting_name text, new_value text, is_local boolean ) → text > > Sets the parameter setting_name to new_value, and returns that value. If > is_local is true, the new value will only apply during the current > transaction. If you want the new value to apply for the rest of the curr