Re: Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread Peter Eisentraut
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

Re: Regarding availability of 32bit client drivers for postgresql 13/14

2022-08-16 Thread Tatsuo Ishii
> 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.sraos

RE: Regarding availability of 32bit client drivers for postgresql 13/14

2022-08-16 Thread Aravind Phaneendra
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

Re: Regarding availability of 32bit client drivers for postgresql 13/14

2022-08-16 Thread Adrian Klaver
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 a

Regarding availability of 32bit client drivers for postgresql 13/14

2022-08-16 Thread Aravind Phaneendra
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

Regarding availability of 32bit client drivers for postgresql 13/14

2022-08-16 Thread Aravind Phaneendra
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 CIC

Re: plpython/python string formatting

2022-08-16 Thread Adrian Klaver
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 plpytho

Re: plpython/python string formatting

2022-08-16 Thread Adrian Klaver
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 plpytho

plpython/python string formatting

2022-08-16 Thread Ted Toth
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 inst

Re: plpython questions

2022-08-16 Thread David G. Johnston
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 commu

Re: plpython questions

2022-08-16 Thread Adrian Klaver
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.

Re: plpython questions

2022-08-16 Thread Bruce Momjian
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

plpython questions

2022-08-16 Thread Ted Toth
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: Can I get the number of results plus the results with a single query?

2022-08-16 Thread Bryn Llewellyn
> 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 row

Re: Can I get the number of results plus the results with a single query?

2022-08-16 Thread Peter J. Holzer
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 … >

Re: Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread Bzm@g
> 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

Re: Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread hubert depesz lubaczewski
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 rat

Re: Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread Tom Lane
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_".

Re: Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread hubert depesz lubaczewski
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, sta

Re: Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread hubert depesz lubaczewski
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 b

Re: Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread Julien Rouhaud
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

Re: Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread Ron
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

Re: Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread hubert depesz lubaczewski
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 chan

Re: Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread Ron
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

Would it be possible to add functions to tab-completion in psql?

2022-08-16 Thread hubert depesz lubaczewski
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: ***SPAM*** Re: Can I get the number of results plus the results with a single query?

2022-08-16 Thread David Rowley
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.email

Re: ***SPAM*** Re: Can I get the number of results plus the results with a single query?

2022-08-16 Thread Walter Dörwald
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