Re: ***SPAM*** Re: Can I get the number of results plus the results with a single query?
On 16 Aug 2022, at 0:13, Rob Sargent wrote: On 8/15/22 14:37, Perry Smith wrote: On Aug 15, 2022, at 08:55, David G. Johnston wrote: On Monday, August 15, 2022, Perry Smith wrote: I’ve been toying with row_number() and then sort by row_number descending and pick off the first row as the total number. Use count as a window function. I see others are commenting after David’s update so: Thank you David. This seems to work for me: SELECT count(*) OVER (), id, basename, sha1 FROM dateien WHERE (lower(ext) in ( 'pxd' ) and ftype = 'file') ORDER BY sha1; This has, e.g. 73, in the first column for all of the rows. Any comparative timing statistics on that? Especially on more than 73 records returned, because with that few just grab them all and get size() or length of what ever collection mechanism you're playing with. I tried with a larger table (739951 records): ``` select e.* from email.email e; ``` takes 50 seconds (as displayed by TablePlus). ``` select count(*) over (), e.* from email.email e; ``` takes 58 seconds. And doing `select count(*) from email.email e;` takes 2-3 seconds. Note that in this example the records where fetched over the internet (i.e. not from a local Postgres installation) and there is no `where` condition that must be evaluated repeatedly, so other variants might give better numbers. Servus, Walter
Re: ***SPAM*** Re: Can I get the number of results plus the results with a single query?
On Tue, 16 Aug 2022 at 21:15, Walter Dörwald wrote: > select count(*) over (), e.* from email.email e; Depending on the complexity of the query, putting the count(*) as a subquery in the SELECT clause might execute more quickly. i.e. select (select count(*) from email.email) c, * from email.emails; A non-correlated subquery will become an "initplan", which will execute only once. The reason the window aggregate might be slower is due to the fact that internally PostgreSQL will store tuples in the window frame in a tuplestore. In this example, all rows will be put in that tuple store at once. These tuple stores will spill to disk when they exceed work_mem. On the other hand, the window aggregate version could be faster if fetching each tuple from the outer query was sufficiently more expensive than storing it in a tuple store. That could easily happen if the query contained expensive joins or many rows were filtered out. That could be more expensive as the subquery version would have to do that twice whereas the window agg version would only have to do that once. David
Would it be possible to add functions to tab-completion in psql?
Hi, As a dba I have to, very often, query system functions, starting with pg_last_xact_replay_timestamp and pg_current_wal_lsn. Would it be possible/hard/expensive, to change tab-completion so that: select pg_ would work? Best regards, depesz
Re: Would it be possible to add functions to tab-completion in psql?
On 8/16/22 07:28, hubert depesz lubaczewski wrote: Hi, As a dba I have to, very often, query system functions, starting with pg_last_xact_replay_timestamp and pg_current_wal_lsn. Would it be possible/hard/expensive, to change tab-completion so that: select pg_ would work? It does, in the psql 9.6 and 12 that I installed from it's native repositories, and the psql 12 installed from RHEL 7/8 native repositories. -- Angular momentum makes the world go 'round.
Re: Would it be possible to add functions to tab-completion in psql?
On Tue, Aug 16, 2022 at 07:42:27AM -0500, Ron wrote: > On 8/16/22 07:28, hubert depesz lubaczewski wrote: > > Hi, > > As a dba I have to, very often, query system functions, starting with > > pg_last_xact_replay_timestamp and pg_current_wal_lsn. > > > > Would it be possible/hard/expensive, to change tab-completion so that: > > > > select pg_ would work? > > It does, in the psql 9.6 and 12 that I installed from it's native > repositories, and the psql 12 installed from RHEL 7/8 native repositories. Hmm .. I'm on Pg 16, linked with readline, and pressing tab after select pg_ just produces new prompt: https://asciinema.org/a/A8w16KhXF7bK4iz7hE7iyyo0D Can you please show me this working, with "which psql", and "ldd $( which psql )" using asciinema? Best regards, depesz
Re: Would it be possible to add functions to tab-completion in psql?
On 8/16/22 08:01, hubert depesz lubaczewski wrote: On Tue, Aug 16, 2022 at 07:42:27AM -0500, Ron wrote: On 8/16/22 07:28, hubert depesz lubaczewski wrote: Hi, As a dba I have to, very often, query system functions, starting with pg_last_xact_replay_timestamp and pg_current_wal_lsn. Would it be possible/hard/expensive, to change tab-completion so that: select pg_ would work? It does, in the psql 9.6 and 12 that I installed from it's native repositories, and the psql 12 installed from RHEL 7/8 native repositories. Hmm .. I'm on Pg 16, linked with readline, and pressing tab after Pg *16*?? select pg_ just produces new prompt: https://asciinema.org/a/A8w16KhXF7bK4iz7hE7iyyo0D Can you please show me this working, with "which psql", and "ldd $( which psql )" using asciinema? $ alias psql12 alias psql12='/usr/lib/postgresql/12/bin/psql -p5433' $ psql12 psql (12.11 (Ubuntu 12.11-1.pgdg18.04+1)) Type "help" for help. postgres=# select * from pg_ Display all 130 possibilities? (y or n) $ ldd /usr/lib/postgresql/12/bin/psql linux-vdso.so.1 (0x7ffe9dfc3000) libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5 (0x7f40d0cc) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f40d0aa) libedit.so.2 => /usr/lib/x86_64-linux-gnu/libedit.so.2 (0x7f40d0868000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x7f40d066) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f40d02c) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f40cfec8000) libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x7f40cfc38000) libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x7f40cf768000) libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x7f40cf518000) libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x7f40cf2c) /lib64/ld-linux-x86-64.so.2 (0x7f40d11c) libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x7f40cf09) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f40cee88000) libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x7f40cebb) libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x7f40ce978000) libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x7f40ce77) libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x7f40ce56) liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x7f40ce35) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x7f40ce13) libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x7f40cdf1) libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x7f40cdcc8000) libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x7f40cd96) libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x7f40cd758000) libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x7f40cd548000) libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x7f40cd2b8000) libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x7f40cd01) libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x7f40ccdd8000) libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x7f40ccbc) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f40cc9a) libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x7f40cc67) libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x7f40cc45) libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x7f40cc0d) libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x7f40cbeb8000) libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x7f40cbc8) libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x7f40cba48000) libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x7f40cb7c) libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x7f40cb59) libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x7f40cb38) libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x7f40cb13) libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x7f40cae2) libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x7f40cabe8000) libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x7f40ca9e) -- Angular momentum makes the world go 'round.
Re: Would it be possible to add functions to tab-completion in psql?
Hi, On Tue, Aug 16, 2022 at 02:28:49PM +0200, hubert depesz lubaczewski wrote: > Hi, > As a dba I have to, very often, query system functions, starting with > pg_last_xact_replay_timestamp and pg_current_wal_lsn. > > Would it be possible/hard/expensive, to change tab-completion so that: > > select pg_ would work? That specific example may be easy to do, but others like e.g. SELECT pg_size_pretty(pg_rel SELECT pg_last_xact_replay_timestamp(), pg_current_w wouldn't. You can refer to [1] and [2] threads for more background, but the limitations that prevented anything from being committed until now still exist so I'm not really hoping for anything new on that side :( I usually have another psql running somewhere, where I can run \df and similar, and copy/paste stuff around. That's not great, but still better than trying to remember the exact spelling of all useful functions. [1] https://www.postgresql.org/message-id/flat/CAMyN-kB_xrU4iYdcF1j%3DtijgO1DSyjtb3j96O4UEj91XZrZcMg%40mail.gmail.com [2] https://www.postgresql.org/message-id/flat/1328820579.11241.4.camel%40vanquo.pezone.net
Re: Would it be possible to add functions to tab-completion in psql?
On Tue, Aug 16, 2022 at 09:55:34PM +0800, Julien Rouhaud wrote: > On Tue, Aug 16, 2022 at 02:28:49PM +0200, hubert depesz lubaczewski wrote: > > Hi, > > As a dba I have to, very often, query system functions, starting with > > pg_last_xact_replay_timestamp and pg_current_wal_lsn. > > > > Would it be possible/hard/expensive, to change tab-completion so that: > > > > select pg_ would work? > That specific example may be easy to do, but others like e.g. > SELECT pg_size_pretty(pg_rel While I would appreciate having full tab-completion on every level, I wouldn't be happy with just first-level. Basically I feel that "because we can't get it perfect" it obscuring the fact that imperfect would be very useful. Best regards, depesz
Re: Would it be possible to add functions to tab-completion in psql?
On Tue, Aug 16, 2022 at 08:51:49AM -0500, Ron wrote: > On 8/16/22 08:01, hubert depesz lubaczewski wrote: > > On Tue, Aug 16, 2022 at 07:42:27AM -0500, Ron wrote: > > > On 8/16/22 07:28, hubert depesz lubaczewski wrote: > > > > Hi, > > > > As a dba I have to, very often, query system functions, starting with > > > > pg_last_xact_replay_timestamp and pg_current_wal_lsn. > > > > > > > > Would it be possible/hard/expensive, to change tab-completion so that: > > > > > > > > select pg_ would work? > > > It does, in the psql 9.6 and 12 that I installed from it's native > > > repositories, and the psql 12 installed from RHEL 7/8 native repositories. > > Hmm .. I'm on Pg 16, linked with readline, and pressing tab after > > Pg *16*?? Yes. I use dev pg on daily basis. > > select pg_ > > just produces new prompt: > > > > https://asciinema.org/a/A8w16KhXF7bK4iz7hE7iyyo0D > > > > Can you please show me this working, with "which psql", and "ldd $( > > which psql )" using asciinema? > > $ alias psql12 > alias psql12='/usr/lib/postgresql/12/bin/psql -p5433' > > $ psql12 > psql (12.11 (Ubuntu 12.11-1.pgdg18.04+1)) > Type "help" for help. > > postgres=# select * from pg_ > Display all 130 possibilities? (y or n) Please note that this example is not really relevant to what I asked about. First of all, I asked about `select pg_`, and not `select * from pg_`, second this tab completion lists tables and views that have names starting with pg_*. And I asked about functions. I know we can tab-complete relations. But we can't functions. Best regards, depesz
Re: Would it be possible to add functions to tab-completion in psql?
hubert depesz lubaczewski writes: > I know we can tab-complete relations. But we can't functions. There is nothing principled about assuming that the first word after SELECT is a function name. It'd be even less principled to provide tab completion only for function names beginning with "pg_". So this idea seems like a wart rather than something anybody would think is a nice improvement. regards, tom lane
Re: Would it be possible to add functions to tab-completion in psql?
On Tue, Aug 16, 2022 at 10:10:55AM -0400, Tom Lane wrote: > There is nothing principled about assuming that the first word > after SELECT is a function name. It'd be even less principled to > provide tab completion only for function names beginning with > "pg_". So this idea seems like a wart rather than something > anybody would think is a nice improvement. While I understand that there is nothing that would suggest it, is there any reason why providing a thing that can legally be there would be bad idea? I understand that someone might want to enter pg_or_not_pg (column name from some table), or perhaps pg.some_column_name - but what is the harm of providing pg_* functions for pg_? Specifically, I'd ask what is the harm of increasing what tab completion can do by a lot - for example, make it tab-complete fields from all tables. And make it possible to tab-complete column name anywhere in where clause. But function name in select would be (for me(!)) great first step, and I can't really see the drawbacks, aside from using developer time to work on it. Best regards, depesz
Re: Would it be possible to add functions to tab-completion in psql?
> As a dba I have to, very often, query system functions, starting with > pg_last_xact_replay_timestamp and pg_current_wal_lsn. > > Would it be possible/hard/expensive, to change tab-completion so that: > > select pg_ would work? Not what you asked for, but anyway, I use \sf pg_ and copy the desired name to fix similar problems. >
Re: Can I get the number of results plus the results with a single query?
On 2022-08-15 12:20:44 -0700, Bryn Llewellyn wrote: > > p...@easesoftware.com wrote: > > Currently I’m doing this with two queries such as: > > SELECT COUNT(*) FROM table WHERE …. expression … > SELECT * FROM table WHERE …. expression … > > But this requires two queries. Is there a way to do the same thing > with just one quer? > > > david.g.johns...@gmail.com wrote: > > Use count as a window function. > > > hjp-pg...@hjp.at wrote: > > I don't think there can be [a way to do the same thing with just one > query]. That's not quite what I meant. I meant "I don't think there can be what you want with just one query", > How about this: > > create table t(k serial primary key, v int not null); > insert into t(v) values (7), (19), (42), (57), (100), (200), (300); > > create function f() > returns table(z text) > language plpgsql > stable > as $body$ > declare > r int not null := 0; > results constant int[] := > ( > select array_agg(v order by v) from t where v < 100 > ); > begin > z := 'Count(*): '||cardinality(results);return next; I may be missing something but I don't see how this solves the problem. The OP wants some kind of progress indicator. To be useful, such an indicator should be approximately linear in time. I.e. if your query returns 1 rows in 5 minutes (yes, that's slow, but you don't need a progress bar for fast queries), it should display "0/1" after 0 seconds, "33/1" after 1 second, "2000/1" after 1 minute, etc. That ideal is of course unrealistic, it's quite ok if it displays "0/unknown" fpr a few seconds and speeds up and slows down during execution. But if it displays "0/unknown" for 4 minutes and 55 seconds and then counts up to 1 during the last 5 seconds, the progress indicator is useless. You are stuffing the whole result into an array and THEN counting the number of elements. So when you get to the count all of the work (except sending the result to the client) is already done, so there is little point in displaying a progress indicator. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature
Re: Can I get the number of results plus the results with a single query?
> hjp-pg...@hjp.at wrote: > > That's not quite what I meant. I meant "I don't think there can be what you > want with just one query", > > The OP wants some kind of progress indicator. To be useful, such an indicator > should be approximately linear in time. I.e. if your query returns 1 rows > in 5 minutes (yes, that's slow, but you don't need a progress bar for fast > queries), it should display "0/1" after 0 seconds, "33/1" after 1 > second, "2000/1" after 1 minute, etc. That ideal is of course > unrealistic, it's quite ok if it displays "0/unknown" fpr a few seconds and > speeds up and slows down during execution. But if it displays "0/unknown" for > 4 minutes and 55 seconds and then counts up to 1 during the last 5 > seconds, the progress > indicator is useless. > > You are stuffing the whole result into an array and THEN counting the number > of elements. So when you get to the count all of the work (except sending the > result to the client) is already done, so there is little point in displaying > a progress indicator. I see, Peter. You’d read the OP’s mind. But I’d failed to. I saw the subject, you I assumed that the OP wanted the entire result set together with the count of the results. (After all, there’s no inflexions of “page” in the OP’s question.) It seems, then, that the requirement is to page through results like a Google search for « SQL injection » does. The first page shows this « About 29,400,000 results (0.45 seconds) » And then it lets you choose other pages to see. That result of about 30 million is famously approximate. After all, nobody, would able be to disprove its correctness. And paging through the results from a SQL query in a stateless browser client has its own (in)famous characteristics. It sounds like the OP wants a fast approximate count for a query whose restriction isn’t known until runtime. (His example uses just a single table). The planner makes estimates like this. Might something along these lines provide what’s being sought: create table t(k int primary key); insert into t(k) select generate_series(1, 100); explain (costs true) select * from t where k between 2 and 20050; This is what it produced for me: Index Only Scan using t_pkey on t (cost=0.42..5.39 rows=48 width=4) Index Cond: ((k >= 2) AND (k <= 20050)) Seems to me that "rows=48” is a perfectly reasonable estimate…
plpython questions
Is this the right list to ask questions about plpython? If not what would be the best list or git repo to ask questions related to plpython? Ted
Re: plpython questions
On Tue, Aug 16, 2022 at 06:15:43PM -0500, Ted Toth wrote: > Is this the right list to ask questions about plpython? If not what > would be the best list or git repo to ask questions related to > plpython? Sure, go ahead. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson
Re: plpython questions
On 8/16/22 16:15, Ted Toth wrote: Is this the right list to ask questions about plpython? If not what would be the best list or git repo to ask questions related to plpython? This is the correct list. plpython(3)u is part of the core code for Postgres. Ted -- Adrian Klaver adrian.kla...@aklaver.com
Re: plpython questions
On Tue, Aug 16, 2022 at 4:16 PM Ted Toth wrote: > Is this the right list to ask questions about plpython? If not what > would be the best list or git repo to ask questions related to > plpython? > > This works if it is truly plpython related questions - that is an extension provided by this community. More general questions about Python programming might find better purchase elsewhere. David J.
plpython/python string formatting
I've just started playing with plpython but ran into a issue when I was trying to use standard python string formatting to generate a SQL string for example: s = "EXECUTE format('CREATE INDEX %s ON %s USING (column_name)' % (index_name, table_name))" but plpython then tried to run the EXECUTE instead of just setting variable 's'. Why does this happen? Ted
Re: plpython/python string formatting
On 8/16/22 16:42, Ted Toth wrote: I've just started playing with plpython but ran into a issue when I was trying to use standard python string formatting to generate a SQL string for example: s = "EXECUTE format('CREATE INDEX %s ON %s USING (column_name)' % (index_name, table_name))" but plpython then tried to run the EXECUTE instead of just setting variable 's'. Why does this happen? Best guess is you are seeing cross platform collision with: https://www.postgresql.org/docs/current/functions-string.html#FUNCTIONS-STRING-FORMAT Why not?: s = format('CREATE INDEX %s ON %s USING (column_name)' % (index_name, table_name)) Ted -- Adrian Klaver adrian.kla...@aklaver.com
Re: plpython/python string formatting
On 8/16/22 16:42, Ted Toth wrote: I've just started playing with plpython but ran into a issue when I was trying to use standard python string formatting to generate a SQL string for example: s = "EXECUTE format('CREATE INDEX %s ON %s USING (column_name)' % (index_name, table_name))" but plpython then tried to run the EXECUTE instead of just setting variable 's'. Why does this happen? Or if you want to correctly quote the identifiers something like: create table test_tbl(id integer); DO $$ index_name = 'test' table_name = 'test_tbl' s = 'CREATE INDEX "' + index_name + '" ' + 'ON "' + table_name + '" (id)' plpy.notice(s) plpy.execute(s) $$ LANGUAGE plpythonu; NOTICE: CREATE INDEX "test" ON "test_tbl" (id) DO \d test_tbl Table "public.test_tbl" Column | Type | Collation | Nullable | Default +-+---+--+- id | integer | | | Indexes: "test" btree (id) Ted -- Adrian Klaver adrian.kla...@aklaver.com
Regarding availability of 32bit client drivers for postgresql 13/14
Hi, My name is Aravind and I am part of IBM CICS TX product development and support. We have a requirement from one of our customers to use IBM CICS TX with PostgreSQL 13/14. IBM CICS TX is a Transaction Manager middleware product that is deployed as container on Kubernetes platforms. IBM CICS TX can interact with database products such as DB2, Oracle, MSSQL, PostgreSQL through XA/Open standards. CICS TX is a 32bit C runtime product and uses the databases’ 32bit client libraries to perform embedded SQL operations. The customer applications are Embedded SQL C or COBOL programs deployed on CICS TX and CICS TX runtime executes them as transactions ensuring the data integrity. We observed there are no 32bit client binaries/libraries available with PostgreSQL 13/14 and CICS TX require them to interact with the PostgreSQL server. Currently we have tested with PostgreSQL 10.12.1 and our customer wants to upgrade to PostgreSQL 13 or 14. Based on the above requirements and details, we have few questions which require your support. 1. Can we get 32bit client binaries/libraries for PostgreSQL 14 ? 2. We also found that the libraries can be built by using the PostgreSQL 14 source. Is it possible to build the 32bit client binaries/libraries from the source available ? 3. Is there an official support for 32bit client libraries/binaries built out of source for customers ? 4. Can the PostgreSQL 10.12.1 client work with PostgreSQL 14 server ? Do you still support PostgreSQL 10.12.1 client ? Thanks & Regards, Aravind Phaneendra CICS TX and TXSeries Development & L3 Support India Systems Development Labs IBM Systems
Regarding availability of 32bit client drivers for postgresql 13/14
Hi, My name is Aravind and I am part of IBM CICS TX product development and support. We have a requirement from one of our customers to use IBM CICS TX with Postgresql 13/14. IBM CICS TX is a Transaction Manager middleware product that is deployed as container on Kubernetes platforms. IBM CICS TX can interact with database products such as DB2, Oracle, MSSQL, Postgresql through XA/Open standards. CICS TX is a 32bit C runtime product and uses the databases’ 32bit client libraries to perform embedded SQL operations. The customer applications are Embedded SQL C or COBOL programs deployed on CICS TX and CICS TX runtime executes them as transactions ensuring the data integrity. We observed there are no 32bit client binaries/libraries available with Postgresql 13/14 and CICS TX require them to interact with the postgresql server. Currently we have tested with Postgresql 10.12.1 and our customer wants to upgrade to Postgresql 13 or 14. Based on the above requirements and details, we have few questions which require your support. 1. Can we get 32bit client binaries/libraries for postgresql 14 ? 2. We also found that the libraries can be built by using the postgresql 14 source. Is it possible to build the 32bit client binaries/libraries from the source available ? 3. Is there an official support for 32bit client libraries/binaries built out of source for customers ? 4. Can the postgresql 10.12.1 client work with Postgresql 14 server ? Do you still support postgresql 10.12.1 client ? Thanks & Regards, Aravind Phaneendra CICS TX and TXSeries Development & L3 Support India Systems Development Labs IBM Systems
Re: Regarding availability of 32bit client drivers for postgresql 13/14
On 8/16/22 20:46, Aravind Phaneendra wrote: Hi, My name is Aravind and I am part of IBM CICS TX product development and support. We have a requirement from one of our customers to use IBM CICS TX with PostgreSQL 13/14. IBM CICS TX is a Transaction Manager middleware product that is deployed as container on Kubernetes platforms. IBM CICS TX can interact with database products such as DB2, Oracle, MSSQL, PostgreSQL through XA/Open standards. CICS TX is a 32bit C runtime product and uses the databases’ 32bit client libraries to perform embedded SQL operations. The customer applications are Embedded SQL C or COBOL programs deployed on CICS TX and CICS TX runtime executes them as transactions ensuring the data integrity. We observed there are no 32bit client binaries/libraries available with PostgreSQL 13/14 and CICS TX require them to interact with the PostgreSQL server. Currently we have tested with PostgreSQL 10.12.1 and our customer wants to upgrade to PostgreSQL 13 or 14. Based on the above requirements and details, we have few questions which require your support. 1. Can we get 32bit client binaries/libraries for PostgreSQL 14 ? The ODBC driver does it: https://odbc.postgresql.org/docs/win32-compilation.html Also the Build farm: https://buildfarm.postgresql.org/cgi-bin/show_status.pl has 32bit/i686 members that show green. 2. We also found that the libraries can be built by using the PostgreSQL 14 source. Is it possible to build the 32bit client binaries/libraries from the source available ? Try it and see. 3. Is there an official support for 32bit client libraries/binaries built out of source for customers ? 4. Can the PostgreSQL 10.12.1 client work with PostgreSQL 14 server ? Do you still support PostgreSQL 10.12.1 client ? Thanks & Regards, Aravind Phaneendra CICS TX and TXSeries Development & L3 Support India Systems Development Labs IBM Systems -- Adrian Klaver adrian.kla...@aklaver.com
RE: Regarding availability of 32bit client drivers for postgresql 13/14
Thank you Adrian for the response, We are looking for 32bit client drivers for RHEL 8.5. An another question .. How does the enterprise customers using PostgreSQL can subscribe to official support ? Thanks & Regards, Aravind Phaneendra CICS TX and TXSeries Development & L3 Support India Systems Development Labs IBM Systems From: Adrian Klaver Date: Wednesday, 17 August 2022 at 9:57 AM To: Aravind Phaneendra , pgsql-general@lists.postgresql.org Subject: [EXTERNAL] Re: Regarding availability of 32bit client drivers for postgresql 13/14 On 8/16/22 20:46, Aravind Phaneendra wrote: > Hi, > > My name is Aravind and I am part of IBM CICS TX product development and > support. We have a requirement from one of our customers to use IBM CICS > TX with PostgreSQL 13/14. IBM CICS TX is a Transaction Manager > middleware product that is deployed as container on Kubernetes > platforms. IBM CICS TX can interact with database products such as DB2, > Oracle, MSSQL, PostgreSQL through XA/Open standards. > > CICS TX is a 32bit C runtime product and uses the databases’ 32bit > client libraries to perform embedded SQL operations. The customer > applications are Embedded SQL C or COBOL programs deployed on CICS TX > and CICS TX runtime executes them as transactions ensuring the data > integrity. > > We observed there are no 32bit client binaries/libraries available with > PostgreSQL 13/14 and CICS TX require them to interact with the > PostgreSQL server. Currently we have tested with PostgreSQL 10.12.1 and > our customer wants to upgrade to PostgreSQL 13 or 14. > > Based on the above requirements and details, we have few questions which > require your support. > > 1. Can we get 32bit client binaries/libraries for PostgreSQL 14 ? The ODBC driver does it: https://odbc.postgresql.org/docs/win32-compilation.html Also the Build farm: https://buildfarm.postgresql.org/cgi-bin/show_status.pl has 32bit/i686 members that show green. > 2. We also found that the libraries can be built by using the > PostgreSQL 14 source. Is it possible to build the 32bit client > binaries/libraries from the source available ? Try it and see. > 3. Is there an official support for 32bit client libraries/binaries > built out of source for customers ? > 4. Can the PostgreSQL 10.12.1 client work with PostgreSQL 14 server ? > Do you still support PostgreSQL 10.12.1 client ? > > Thanks & Regards, > > Aravind Phaneendra > > CICS TX and TXSeries Development & L3 Support > > India Systems Development Labs > > IBM Systems > -- Adrian Klaver adrian.kla...@aklaver.com
Re: Regarding availability of 32bit client drivers for postgresql 13/14
> An another question .. How does the enterprise customers using PostgreSQL can > subscribe to official support ? Please take a look at this URL: https://www.postgresql.org/support/ Best reagards, -- Tatsuo Ishii SRA OSS LLC English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp
Re: Would it be possible to add functions to tab-completion in psql?
On 16.08.22 16:14, hubert depesz lubaczewski wrote: Specifically, I'd ask what is the harm of increasing what tab completion can do by a lot - for example, make it tab-complete fields from all tables. And make it possible to tab-complete column name anywhere in where clause. But function name in select would be (for me(!)) great first step, and I can't really see the drawbacks, aside from using developer time to work on it. I think in this case it would be straightforward to write a patch and then we can see what the experience is in practice. I agree this could be a useful feature.