Re: Compare with default value?

2021-03-13 Thread Tim Cross
Ulrich Goebel writes: > Hi, > > o.k. I have to give some more information... > > Am 13.03.21 um 19:39 schrieb David G. Johnston: >> On Saturday, March 13, 2021, Ulrich Goebel > > wrote: >> >> I would like to get the rows, where a column has the default value, >>

Re: Compare with default value?

2021-03-13 Thread Rob Sargent
> On Mar 13, 2021, at 1:51 PM, David G. Johnston > wrote: > >  >> On Sat, Mar 13, 2021 at 1:41 PM Ulrich Goebel wrote: >> But it could help to get a reference to the default value. > > There is no such thing as a "default value". There is a "default expression" > though. It should be

Re: Compare with default value?

2021-03-13 Thread Joe Conway
On 3/13/21 1:05 PM, Ulrich Goebel wrote: I would like to get the rows, where a column has the default value, similar to: select id fromt tbl where col = default Is there a chance? It isn't pretty, and not all that practical, but for example: 8< create table def(id int,

Re: Compare with default value?

2021-03-13 Thread David G. Johnston
On Sat, Mar 13, 2021 at 1:41 PM Ulrich Goebel wrote: > But it could help to get a reference to the default value. > There is no such thing as a "default value". There is a "default expression" though. It should be available in the system catalogs as part of the definition of a table. But I'm

Re: Compare with default value?

2021-03-13 Thread Ulrich Goebel
Hi, o.k. I have to give some more information... Am 13.03.21 um 19:39 schrieb David G. Johnston: On Saturday, March 13, 2021, Ulrich Goebel > wrote: I would like to get the rows, where a column has the default value, similar to: select id fromt tbl

Re: How to recover data from 9.3 data directory

2021-03-13 Thread Adrian Klaver
On 3/13/21 12:04 PM, Andrus wrote: Or you could just use the the Postgres APT repo, as example: https://apt.postgresql.org/pub/repos/apt/dists/stretch-pgdg/9.3/ see also

Re: How to recover data from 9.3 data directory

2021-03-13 Thread Andrus
Or you could just use the the Postgres APT repo, as example: https://apt.postgresql.org/pub/repos/apt/dists/stretch-pgdg/9.3/ see also

Re: how to best remove version 10 (and keep version 9.5)

2021-03-13 Thread Adrian Klaver
On 3/13/21 11:00 AM, robert rottermann wrote: Hi folks I am running an Ubuntu 18.04 lts remote box. For some (complicated) reasons I did install PostgreSQL 9.5 alongside the already installed V10 instance. I did set the data_directory to point some disk  “outside” the standard

how to best remove version 10 (and keep version 9.5)

2021-03-13 Thread robert rottermann
Hi folks I am running an Ubuntu 18.04 lts remote box. For some (complicated) reasons I did install PostgreSQL 9.5 alongside the already installed V10 instance. I did set the data_directory to point some disk  “outside” the standard /etc/postgresql/9.5/main structure. Now, what I would

Re: Compare with default value?

2021-03-13 Thread David G. Johnston
On Saturday, March 13, 2021, Ulrich Goebel wrote: > > I would like to get the rows, where a column has the default value, > similar to: > > select id fromt tbl where col = default > If the default is a simple constant then why go through the trouble instead of just writing col = ‘constant’ ?

solved: Re: how to set permission, so I can run pg_dumd in a cron job

2021-03-13 Thread robert rottermann
Thanks again Adrian On 13.03.21 18:37, Adrian Klaver wrote: On 3/13/21 9:25 AM, robert rottermann wrote: Adrin, thanks can you please give me a hand 1) Did you have the server reload the conf files after making the changes? yes I did 2) Is there an entry for something like: local 

Compare with default value?

2021-03-13 Thread Ulrich Goebel
Hi, I would like to get the rows, where a column has the default value, similar to: select id fromt tbl where col = default Is there a chance? Thank's Ulrich -- Ulrich Goebel Am Büchel 57, 53173 Bonn

Re: how to set permission, so I can run pg_dumd in a cron job

2021-03-13 Thread Adrian Klaver
On 3/13/21 9:25 AM, robert rottermann wrote: Adrin, thanks can you please give me a hand 1) Did you have the server reload the conf files after making the changes? yes I did 2) Is there an entry for something like: local   all all  peer before the lines you show above? no I

Re: how to set permission, so I can run pg_dumd in a cron job

2021-03-13 Thread robert rottermann
Adrin, thanks On 13.03.21 17:23, Adrian Klaver wrote: On 3/13/21 8:16 AM, robert rottermann wrote: Hi Friends I would like to have a cronjob creating a dump of a db. I am on a ubuntu 18 lts, potgres v10. I have a user robert with superuser db permission. a database "mydb" of which I would

Re: how to set permission, so I can run pg_dumd in a cron job

2021-03-13 Thread Adrian Klaver
On 3/13/21 8:16 AM, robert rottermann wrote: Hi Friends I would like to have a cronjob creating a dump of a db. I am on a ubuntu 18 lts, potgres v10. I have a user robert with superuser db permission. a database "mydb" of which I would like to to a nightly dump. I tried to set thing in

Re: How to recover data from 9.3 data directory

2021-03-13 Thread Julien Rouhaud
Le dim. 14 mars 2021 à 00:17, Adrian Klaver a écrit : > On 3/13/21 7:25 AM, Andrus wrote: > > Hi! > > > > >Debian does not offer to install Postgres 9.3 into it. How to install > > postgres 9.3 in new Debian ? > > > >> > >> >You'll have to compile it. > > > > Enterpisedb offers 9.3 download for

Re: How to recover data from 9.3 data directory

2021-03-13 Thread Adrian Klaver
On 3/13/21 7:25 AM, Andrus wrote: Hi! >Debian does not offer to install Postgres 9.3 into it. How to install postgres 9.3 in new Debian ? >You'll have to compile it. Enterpisedb offers 9.3 download for Linux in https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

how to set permission, so I can run pg_dumd in a cron job

2021-03-13 Thread robert rottermann
Hi Friends I would like to have a cronjob creating a dump of a db. I am on a ubuntu 18 lts, potgres v10. I have a user robert with superuser db permission. a database "mydb" of which I would like to to a nightly dump. I tried to set thing in hba_conf like this: # Database administrative

Re: How to recover data from 9.3 data directory

2021-03-13 Thread Andrus
Hi! >Debian does not offer to install Postgres 9.3 into it. How to install postgres 9.3 in new Debian ? >You'll have to compile it. Enterpisedb offers 9.3 download for Linux in https://www.enterprisedb.com/downloads/postgres-postgresql-downloads Maybe it is possible to install it in

Re: How to recover data from 9.3 data directory

2021-03-13 Thread Guillaume Lelarge
Le sam. 13 mars 2021 à 15:18, Andrus a écrit : > Should I create virtual machine and install Linux with 9.3 into it or is >> there simpler solution? >> > that's the only option, unless you already have some compatible server > around. > > I have new Debian virtual machine with Postgres 12 . > >

Re: How to recover data from 9.3 data directory

2021-03-13 Thread Andrus
Should I create virtual machine and install Linux with 9.3 into it or is there simpler solution? that's the only option, unless you already have some compatible server around. I have new Debian virtual machine with Postgres 12  . Debian does not offer to install Postgres 9.3 into it.

Re: How to recover data from 9.3 data directory

2021-03-13 Thread Julien Rouhaud
Le sam. 13 mars 2021 à 22:02, Andrus a écrit : > Hi! > > > that won't work on windows. pg_upgrade only works if source and target > environment are binary compatible, which isn't the case for windows / GNU > Linux. > > wal archiving works between Linux and Windows. So I expected those > commands

Re: How to recover data from 9.3 data directory

2021-03-13 Thread Andrus
Hi! > that won't work on windows. pg_upgrade only works if source and target environment are binary compatible, which isn't the case for windows / GNU Linux. wal archiving works between Linux and Windows. So I expected those commands to work also. How to determine is this data from 32 or

Re: How to recover data from 9.3 data directory

2021-03-13 Thread Julien Rouhaud
Le sam. 13 mars 2021 à 21:29, Andrus a écrit : > 2. Tried to run old server using > C:\Program Files\PostgreSQL\9.3\bin\pg_ctl.exe" start -D > "D:/Centos93Data/data" > got error > > FATAL: database files are incompatible with server > DETAIL: The database cluster was initialized with

Re: pg_upgrade and wraparound

2021-03-13 Thread Jan Wieck
On 3/12/21 8:30 PM, Michael Paquier wrote: Hi Jan, On Fri, Mar 12, 2021 at 06:13:33PM -0500, Jan Wieck wrote: One of the things in my way is that when using pg_resetwal to put the NextXID way into the future (to push the old cluster close to wraparound for example), the postmaster won't start

How to recover data from 9.3 data directory

2021-03-13 Thread Andrus
Hi! There is data directory from Postgres 9.3 server from old Centos. Centos server is not running anymore and there is window 10 workstation to recover. 1. Tried to recover data from it installing 9.3 and 13 servers in windows 10 and using "C:\Program