Re: reviving "custom" dump

2022-11-10 Thread Rob Sargent
On 11/10/22 23:29, David G. Johnston wrote: On Thu, Nov 10, 2022 at 11:13 PM Rob Sargent wrote: Short version: Does a current version of postgres tolerate ascii dumps from older versions? I've been charged with reviving an old project.  I have a dump dated July of 2021 which f

Re: reviving "custom" dump

2022-11-10 Thread Rob Sargent
On 11/10/22 23:29, Tom Lane wrote: Rob Sargent writes: Short version: Does a current version of postgres tolerate ascii dumps from older versions? We intend it to. Have you got an actual problem? regards, tom lane I have to lay out options in the morning.  Thanks.  No

Re: reviving "custom" dump

2022-11-10 Thread Tom Lane
Rob Sargent writes: > Short version: Does a current version of postgres tolerate ascii dumps > from older versions? We intend it to. Have you got an actual problem? regards, tom lane

Re: reviving "custom" dump

2022-11-10 Thread David G. Johnston
On Thu, Nov 10, 2022 at 11:13 PM Rob Sargent wrote: > Short version: Does a current version of postgres tolerate ascii dumps > from older versions? > > I've been charged with reviving an old project. I have a dump dated July > of 2021 which file tells me is a "PostgreSQL custom database dump > V

reviving "custom" dump

2022-11-10 Thread Rob Sargent
Short version: Does a current version of postgres tolerate ascii dumps from older versions? I've been charged with reviving an old project.  I have a dump dated July of 2021 which file tells me is a "PostgreSQL custom database dump V1.13-0".  If our compute centre won't roll me a V12(?) postgr

Re: programmatically retrieve details of a custom Postgres type

2022-11-10 Thread Tom Lane
I wrote: > For a composite type, pg_type.typrelid links to pg_class and pg_attribute > entries that work much like a table. Actually, you could reverse that: for a table, pg_type.typrelid links to pg_class and pg_attribute entries that work much like a composite type. For both relations and compo

Re: programmatically retrieve details of a custom Postgres type

2022-11-10 Thread Pavel Stehule
pá 11. 11. 2022 v 5:02 odesílatel Konstantin Izmailov napsal: > Hello, > I was unable to find how to get column names, sizes and types for a given > composite type. > > Example. For a type defines as: > CREATE TYPE inventory_item AS ( > name text, > supplier_id integer, > price numeric >

Re: programmatically retrieve details of a custom Postgres type

2022-11-10 Thread Tom Lane
Konstantin Izmailov writes: > I was unable to find how to get column names, sizes and types for a given > composite type. For a composite type, pg_type.typrelid links to pg_class and pg_attribute entries that work much like a table. For instance, # select a.attname, a.atttypid::regtype from pg_

programmatically retrieve details of a custom Postgres type

2022-11-10 Thread Konstantin Izmailov
Hello, I was unable to find how to get column names, sizes and types for a given composite type. Example. For a type defines as: CREATE TYPE inventory_item AS ( name text, supplier_id integer, price numeric ); I have a plpgsql stored proc that returns SETOF inventory_item (i.e. there is n

Re: Setting up replication on Windows, v9.4

2022-11-10 Thread Brad White
From the error log:      FATAL:  hot standby is not possible because wal_level was not set to "hot_standby" or higher on the master server      HINT:  Either set wal_level to "hot_standby" on the master, or turn off hot_standby here. I tried setting hot_standby to off, but that

Re: Setting up replication on Windows, v9.4

2022-11-10 Thread Brad White
On 11/7/2022 3:42 PM, Rob Sargent wrote: > Care to share some of the ways the app stopped working?  You might get a leg up on where best to remediate. I don't recall, as that was a few months ago. We are running MS-Access as a front end with Postgres as the back end. It appeared to read and wr

Re: IMMUTABLE function to cast enum to/from text?

2022-11-10 Thread Philip Semanchuk
> On Nov 10, 2022, at 3:39 PM, Tom Lane wrote: > > Joe Conway writes: >> >> CREATE OR REPLACE FUNCTION mood2text(mood) >> RETURNS text AS >> $$ >> select $1 >> $$ STRICT IMMUTABLE LANGUAGE sql; > > Of course, what this is doing is using a SQL-function wrapper to > lie about the mutability

Re: IMMUTABLE function to cast enum to/from text?

2022-11-10 Thread Tom Lane
Joe Conway writes: > On 11/10/22 14:52, Philip Semanchuk wrote: >> I have seen conversations that suggest creating a custom IMMUTABLE >> function to perform the cast, but I can't figure out how to do that >> except with a CASE statement that enumerates every possible value. Is >> there a more eleg

Re: IMMUTABLE function to cast enum to/from text?

2022-11-10 Thread Joe Conway
On 11/10/22 14:52, Philip Semanchuk wrote: Hi all, I know that Postgres' enum_in()/enum_out() functions have a volatility class of STABLE, and STABLE is required because enum elements can be renamed. We have an enum in our database used in a number of custom functions, all of which require castin

IMMUTABLE function to cast enum to/from text?

2022-11-10 Thread Philip Semanchuk
Hi all, I know that Postgres' enum_in()/enum_out() functions have a volatility class of STABLE, and STABLE is required because enum elements can be renamed. We have an enum in our database used in a number of custom functions, all of which require casting the enum to/from text. Since enum_in() a

Aw: Re: Q: documentation improvement re collation version mismatch

2022-11-10 Thread Karsten Hilbert
> > The comment above the query in the official documentation is rather > > assertive > > (even if may true to the letter) and may warrant some more cautionary > > wording ? Added, perhaps, some variation of this: > > > > > For now, the only safe way to go is either reindex everything, or > > >

Re: pgadmin4 versions on Ubuntu 22.04

2022-11-10 Thread Adrian Klaver
On 11/10/22 08:19, Richard Welty wrote: and that was it. uncommented the line in /etc/apt/sources.list.d/pgadmin4.list updated and asked for an upgrade and it worked. only reason i found it was i went looking to verify which repo i was using and saw the comment. Did you change https://ftp.po

Re: pgadmin4 versions on Ubuntu 22.04

2022-11-10 Thread Richard Welty
and that was it. uncommented the line in /etc/apt/sources.list.d/pgadmin4.list updated and asked for an upgrade and it worked. only reason i found it was i went looking to verify which repo i was using and saw the comment. richard On Thu, 10 Nov 2022 11:15:02 -0500 Richard W

Re: pgadmin4 versions on Ubuntu 22.04

2022-11-10 Thread Richard Welty
may have just found the issue: # deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 main # disabled on upgrade to jammy will retry shortly. richard On Thu, 10 Nov 2022 10:58:12 -0500 Adrian Klaver wrote --- On 11/10/22 07:48, Richard Welty wrote: > i

Re: copy file from a client app to remote postgres isntance

2022-11-10 Thread Вадим Самохин
чт, 10 нояб. 2022 г. в 01:32, Peter J. Holzer : > On 2022-11-09 12:57:23 -0600, Ron wrote: > > On 11/9/22 10:17, Peter J. Holzer wrote: > > > On 2022-11-07 14:40:40 -0600, Ron wrote: > > > > On 11/7/22 10:57, Вадим Самохин wrote: > > > > I have an application that must copy a local file in cs

Re: pgadmin4 versions on Ubuntu 22.04

2022-11-10 Thread Adrian Klaver
On 11/10/22 07:48, Richard Welty wrote: i'm currently running pgadmin4 6.12 on a Ubuntu 22.04 desktop. it's regularly notifying me that 6.15 is available. i installed using the apt repository method in the docs, and no upgrade is available there (or at least, that's what apt reports when i ask fo

pgadmin4 versions on Ubuntu 22.04

2022-11-10 Thread Richard Welty
i'm currently running pgadmin4 6.12 on a Ubuntu 22.04 desktop. it's regularly notifying me that 6.15 is available. i installed using the apt repository method in the docs, and no upgrade is available there (or at least, that's what apt reports when i ask for one.) wondering when the repo migh

Re: Q: documentation improvement re collation version mismatch

2022-11-10 Thread Julien Rouhaud
On Thu, Nov 10, 2022 at 08:39:03AM -0600, Ron wrote: > On 11/10/22 08:33, Julien Rouhaud wrote: > > On Thu, Nov 10, 2022 at 08:04:37AM -0600, Ron wrote: > > > On 11/10/22 02:33, Julien Rouhaud wrote: > > > [snip] > > > > For now, the only safe way to go is either reindex everything, or > > > > eve

Re: Q: documentation improvement re collation version mismatch

2022-11-10 Thread Ron
On 11/10/22 08:33, Julien Rouhaud wrote: On Thu, Nov 10, 2022 at 08:04:37AM -0600, Ron wrote: On 11/10/22 02:33, Julien Rouhaud wrote: [snip] For now, the only safe way to go is either reindex everything, or everything except some safe cases (non-partial indexes on plain-non-collatable datatype

Re: Q: documentation improvement re collation version mismatch

2022-11-10 Thread Julien Rouhaud
On Thu, Nov 10, 2022 at 08:04:37AM -0600, Ron wrote: > On 11/10/22 02:33, Julien Rouhaud wrote: > [snip] > > For now, the only safe way to go is either reindex everything, or everything > > except some safe cases (non-partial indexes on plain-non-collatable > > datatypes > > only). Usually, those

Re: Q: documentation improvement re collation version mismatch

2022-11-10 Thread Ron
On 11/10/22 02:33, Julien Rouhaud wrote: [snip] For now, the only safe way to go is either reindex everything, or everything except some safe cases (non-partial indexes on plain-non-collatable datatypes only). Usually, those safe cases are usually enough to avoid most of useless reindex activity

Re: Q: documentation improvement re collation version mismatch

2022-11-10 Thread Julien Rouhaud
On Thu, Nov 10, 2022 at 11:47:01AM +0100, Karsten Hilbert wrote: > Thanks, Julien, for your explanation. > > > > regarding changed collation versions this > > > > > > https://www.postgresql.org/docs/devel/sql-altercollation.html > > > > > > says: > > > > > > The following query can be used to

Aw: Re: Q: documentation improvement re collation version mismatch

2022-11-10 Thread Karsten Hilbert
Thanks, Julien, for your explanation. > > regarding changed collation versions this > > > > https://www.postgresql.org/docs/devel/sql-altercollation.html > > > > says: > > > > The following query can be used to identify all > > collations in the current database that need to be > >

change analyze function for a array type

2022-11-10 Thread 黄宁
I create a new type and want to change its array type analyze function. I use ALTER TYPE typename SET (ANALYZE = func); not worked?

Re: Q: documentation improvement re collation version mismatch

2022-11-10 Thread Julien Rouhaud
Hi, On Wed, Nov 09, 2022 at 12:45:17PM +0100, Karsten Hilbert wrote: > Dear all, > > regarding changed collation versions this > > https://www.postgresql.org/docs/devel/sql-altercollation.html > > says: > > The following query can be used to identify all > collations in the curre