Re: Interval in hours but not in days Leap second not taken into account

2023-02-28 Thread Thomas Munro
On Mon, Feb 27, 2023 at 8:26 PM PALAYRET Jacques wrote: > # PostgreSQL does not take into account the additional second (leap second) > in some calendar days ; eg. 2016, 31 dec. : > SELECT to_timestamp('20170102 10:11:12','mmdd hh24:mi:ss') - > to_timestamp('20161230 00:00:00','mmdd hh24

Re: 13.x, stream replication and locale(?) issues

2023-02-28 Thread Thomas Munro
On Wed, Mar 1, 2023 at 12:09 AM Eugene M. Zheganin wrote: > 3) how do I fix it ? Should I take locale sources for ru_RU.utf8 on Linux and > compile it on FreeBSD - will it help ? Out of curiosity (I'm not saying it's a good idea!), do you know if FreeBSD's localedef can compile glibc's collatio

Re: Quit currently running query

2023-02-28 Thread Ron
On 2/28/23 11:31, Peter J. Holzer wrote: On 2023-02-28 07:42:08 -0600, Ron wrote: On 2/28/23 04:53, Albert Cornelius wrote: How can I quit a currently running query? I've issued a query and my server does not respond anymore. Is there another solution than using kill -9? What s

Re: Quit currently running query

2023-02-28 Thread Peter J. Holzer
On 2023-02-28 07:42:08 -0600, Ron wrote: > On 2/28/23 04:53, Albert Cornelius wrote: > > How can I quit a currently running query? I've issued a query and > my server does not respond anymore. Is there another solution than > using kill -9? > > > What specifically do you mean by "my

Re: Move all elements toward another schema?

2023-02-28 Thread Marcos Pegoraro
> > As far as i know, this piece of code would move the data. But how to also > move indexes, constraints, primary key? > > create schema if not exists a; create schema if not exists b; create table a.a(id integer not null constraint pk_a primary key, name text); create index idx_a_name on a.a(name

Re: Move all elements toward another schema?

2023-02-28 Thread David G. Johnston
On Tue, Feb 28, 2023 at 9:37 AM celati Laurent wrote: > Good afternoon, > > With postgresql 13, I want to find a way to move 100 tables from schema > 'A' to schema 'B'. Not just data. But also indexes, primary keys, > constraints (INCLUDING ALL). > As far as i know, this piece of code would move

Move all elements toward another schema?

2023-02-28 Thread celati Laurent
Good afternoon, With postgresql 13, I want to find a way to move 100 tables from schema 'A' to schema 'B'. Not just data. But also indexes, primary keys, constraints (INCLUDING ALL). As far as i know, this piece of code would move the data. But how to also move indexes, constraints, primary key?

Re: Quit currently running query

2023-02-28 Thread Rob Sargent
On 2/28/23 03:53, Albert Cornelius wrote: How can I quit a currently running query? I've issued a query and my server does not respond anymore. Is there another solution than using kill -9? can you open another psql session to your server?

Re: 13.x, stream replication and locale(?) issues

2023-02-28 Thread Tom Lane
"Eugene M. Zheganin" writes: > I have a 13.4 pgsql instance on Linux which has a bunch of databases > with UTF-8/ru_RU.utf8 encoding/collation set. > I've stream replicated it to the 13.10 instance on FreeBSD (may be this > is the part where it all has gone wrong way, but at this moment I > be

Re: Quit currently running query

2023-02-28 Thread Ron
On 2/28/23 04:53, Albert Cornelius wrote: How can I quit a currently running query? I've issued a query and my server does not respond anymore. Is there another solution than using kill -9? What *specifically* do you mean by "my server does not respond anymore"?  Because if "the server" /reall

Re: Quit currently running query

2023-02-28 Thread Ian Lawrence Barwick
2023年2月28日(火) 22:30 Albert Cornelius : > > How can I quit a currently running query? I've issued a query and my server > does not respond anymore. Is there another solution than using kill -9? See here: https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL Regar

Quit currently running query

2023-02-28 Thread Albert Cornelius
How can I quit a currently running query? I've issued a query and my server does not respond anymore. Is there another solution than using kill -9?

13.x, stream replication and locale(?) issues

2023-02-28 Thread Eugene M. Zheganin
Hello. I have a 13.4 pgsql instance on Linux which has a bunch of databases with UTF-8/ru_RU.utf8 encoding/collation set. I've stream replicated it to the 13.10 instance on FreeBSD (may be this is the part where it all has gone wrong way, but at this moment I believe streaming replication sh

Re: Tempory table is not getting created inside Function in postgres.

2023-02-28 Thread nikhil raj
HI All, This for the help plpgsql and rest everything just move under declare and now everything works fine. Thanks for the help. On Tue, Feb 28, 2023 at 2:10 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Mon, Feb 27, 2023 at 1:17 PM nikhil raj wrote: > >> >> The same query

Re: DISTINCT *and* ORDER BY in aggregate functions on expressions(!)y

2023-02-28 Thread Alban Hertroys
> On 28 Feb 2023, at 3:54, Thorsten Glaser wrote: (…) >> Well, that may be what you want, but it's not what you wrote in >> the query. Follow David's advice and do > […] >> I'm pretty sure that this will only incur one evaluation of the >> common subexpression, so even though it's tedious to