Hi
PostgreSQL 12.1
I am trying to figure out, how can I get rid of brackets for variable.
Example as follows:
DO $$
> DECLARE
> cur cursor for
> select * from (values('logi_web'), ('logi_taustaprotsess')) as q (col1);
> BEGIN
> for i in cur LOOP
> RAISE NOTICE 'create table %_y2020m01 PARTITION
Awesome, thanks!
Kontakt Geoff Winkless () kirjutas kuupäeval K, 5.
veebruar 2020 kell 13:11:
>
>
> On Wed, 5 Feb 2020 at 10:48, Raul Kaubi wrote:
>
>>
>> DO $$
>>> DECLARE
>>> cur cursor for
>>> select * from (values('logi_web'), (
Hi
PostgreSQL 12.1
How can I declare another variable from another variable.
Basically from oracle, I can just:
> var1 := 'asda'||var2;
In postgres, I have the following example, I would like to use variable j
to add number of months there.
" interval 'j month')::date; "
DO $$
> DECLARE
> v
v_to_date := (date_trunc('month',current_date)::date + interval '1 month' +
interval '1 month'*j)::date;
Raul
Kontakt Yasin Sari () kirjutas kuupäeval K, 5.
veebruar 2020 kell 14:28:
> On Wed, Feb 5, 2020 at 2:22 PM Raul Kaubi wrote:
>
>>
>> DO $
Makes sense yeah.
Thanks for both of your help.
Raul
Kontakt hubert depesz lubaczewski () kirjutas kuupäeval
K, 5. veebruar 2020 kell 14:50:
> On Wed, Feb 05, 2020 at 02:42:42PM +0200, Raul Kaubi wrote:
> > Thanks, it worked!
> >
> > By the way, what does this "**j&
Hi
PostgreSQL 12.1
Let's say I want my procedure/function to resume work after specific error
( duplicate_table ).
Is it possible to resume work after error..?
EXCEPTION
> WHEN duplicate_table then ..;
Or is there different approach to achieve that..?
Thanks
Raul
tas kuupäeval
K, 5. veebruar 2020 kell 17:03:
> On Wed, Feb 05, 2020 at 04:17:09PM +0200, Raul Kaubi wrote:
> > Let's say I want my procedure/function to resume work after specific
> error
> > ( duplicate_table ).
> > Is it possible to resume work after error..
Hi
Is there a simple way to dynamically get for example parameter "shared buffers"
value (megabytes or gigabytes) to bytes, for monitoring perspective..?
At the moment, this gives me value in GB.
# psql -U postgres -Atc "show shared_buffers;"
1GB
This value may as well be in MB. So I am lookin
Hi
Thanks for all the replies.
So at first, I did this:
select (pg_size_bytes(setting) * (select setting from pg_settings where
name = 'block_size')::int) as shared_buffers from pg_settings where name =
'shared_buffers';
But as I understood, that the preferred way would be this, correct..? (at
Hi
CentOS 7
Postgres 9 to 12
I am looking ways to universally discover postgresql binary directory
for monitoring purpose.
For example postgres 12, it is: */usr/pgsql-12*
So what would be the best way to discover this in specific host.
Regards
Raul
Hi
Thanks, you solution works for most of the databases. But now I noticed
that we have single 9.5 version also.
And seems like this function *pg_size_bytes* came from 9.6
# psql -U postgres -Atc "select
> pg_size_bytes(current_setting('shared_buffers'));"
> ERROR: function pg_size_bytes(text) d
Hi
CentOS 7
Postgres 9 to 12
For monitoring purpose, I would like that certain scripts are only run in
primary server.
So I am looking ways to universally discover if postgresql cluster that is
running is primary or not.
What would be the best way to achieve this?
Regards
Raul
>
> > On 20. Nov, 2020, at 10:03, Thomas Kellerer wrote:
> >
> > Raul Kaubi schrieb am 20.11.2020 um 09:53:
> >> CentOS 7
> >> Postgres 9 to 12
> >>
> >> For monitoring purpose, I would like that certain scripts are only run
> in primary ser
Hmm, ok.
But how is this possible..?
when b.sender>0 and c.receiver>0 then
> 'Primary+Replica'
Raul
Kontakt Paul Förster () kirjutas kuupäeval R, 20.
november 2020 kell 12:04:
> Hi Raul,
>
> > On 20. Nov, 2020, at 10:41, Raul Kaubi wrote:
>
Ok, Thanks!
Raul
Kontakt Paul Förster () kirjutas kuupäeval R, 20.
november 2020 kell 12:54:
> Hi Raul,
>
> > On 20. Nov, 2020, at 11:45, Raul Kaubi wrote:
> >
> > Hmm, ok.
> >
> > But how is this possible..?
> >
> > when b.sender>0 and
H
Centos7, postgres 13
We have a problem with certain select statement, which produces error and we
would like to know the bind value that is given as parameter.
At the moment, the column is bigint type, and probably the bind that goes there
is text, in postgresql logfile, the error is followin
bind parameter
from the second query (as I understood the developer).
Regards
Raul
Kontakt Tom Lane () kirjutas kuupäeval T, 7. september
2021 kell 16:48:
> Raul Kaubi writes:
> > We have a problem with certain select statement, which produces error
> and we would like to know the bin
17 matches
Mail list logo