Re: Set COLLATE on a session level

2020-12-03 Thread Dirk Mika
> > > Or views in schemas per locale. Selecting the search path > > > per locale pulls in the right view. > > > > And one view per locale would mean that I would have to > > create a whole schema including all views for each locale I > > want to support. I would have to roll out a new version of >

Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path

2020-12-03 Thread Michael Paquier
On Thu, Dec 03, 2020 at 01:45:05PM +0100, Pavel Stehule wrote: > When you write C extensions for Postgres, then PostgreSQL source code is > the best source of inspiration. One common source of inspiration for such cases is regproc.c. For a type, you can for example look at what to_regtype() uses

Re: postgres-10 with FIPS

2020-12-03 Thread Michael Paquier
On Thu, Dec 03, 2020 at 05:57:04PM +0530, Aravindhan Krishnan wrote: > Since postgres is linked against openssl we wanted to make sure we build > postgres against the FIPS compliant openssl libraries. Does postgres > provide a FIPS debian package that can be used. If not it would be of great > help

Re: Alter the column data type of the large data volume table.

2020-12-03 Thread Ron
On 12/3/20 11:53 AM, Michael Lewis wrote: On Thu, Dec 3, 2020 at 10:18 AM Rich Shepard > wrote: Tell me, please, why ALTER TABLE ALTER COLUMN SET DATA TYPE BIGINT will not do the job? I've found some varchar columns in a couple of tables t

Re: Alter the column data type of the large data volume table.

2020-12-03 Thread Michael Lewis
On Thu, Dec 3, 2020 at 10:18 AM Rich Shepard wrote: > Tell me, please, why > > ALTER TABLE ALTER COLUMN SET DATA TYPE BIGINT > > will not do the job? > > I've found some varchar columns in a couple of tables too small and used > the > above to increase their size. Worked perfectly. > Somethin

Re: Alter the column data type of the large data volume table.

2020-12-03 Thread Ron
On 12/3/20 11:26 AM, Michael Lewis wrote: On Thu, Dec 3, 2020 at 10:18 AM Rich Shepard > wrote: On Thu, 3 Dec 2020, Michael Lewis wrote: > On Wed, Dec 2, 2020 at 11:53 PM charles meng mailto:xly...@gmail.com>> wrote: >> I have a table with 1.6 billi

Re: Alter the column data type of the large data volume table.

2020-12-03 Thread Rich Shepard
On Thu, 3 Dec 2020, Michael Lewis wrote: Afaik, it will require an access exclusive lock for the entire time it takes to re-write the 1.6 billion rows and update all indexes. That sort of lock out time doesn't seem workable in many production systems. Michael, Okay. I hadn't thought of that.

Re: Alter the column data type of the large data volume table.

2020-12-03 Thread Michael Lewis
On Thu, Dec 3, 2020 at 10:18 AM Rich Shepard wrote: > On Thu, 3 Dec 2020, Michael Lewis wrote: > > > On Wed, Dec 2, 2020 at 11:53 PM charles meng wrote: > > >> I have a table with 1.6 billion records. The data type of the primary > key > >> column is incorrectly used as integer. I need to replac

Re: Alter the column data type of the large data volume table.

2020-12-03 Thread Rich Shepard
On Thu, 3 Dec 2020, Michael Lewis wrote: On Wed, Dec 2, 2020 at 11:53 PM charles meng wrote: I have a table with 1.6 billion records. The data type of the primary key column is incorrectly used as integer. I need to replace the type of the column with bigint. Is there any ideas for this?

Re: Alter the column data type of the large data volume table.

2020-12-03 Thread Michael Lewis
On Wed, Dec 2, 2020 at 11:53 PM charles meng wrote: > Hi all, > > I have a table with 1.6 billion records. The data type of the primary key > column is incorrectly used as integer. I need to replace the type of the > column with bigint. Is there any ideas for this? > > Solutions that have been tr

Re: psql > split > queries & output

2020-12-03 Thread Wim Bertels
Daniel Verite schreef op do 03-12-2020 om 15:18 [+0100]: > Wim Bertels wrote: > > > * one pipe (or..) to a file which only contains the statements > > (queries) history (and not the output) > > * another pipe (or..) to a file which only contains the output > > (with or > > without the statem

Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path

2020-12-03 Thread Pavel Stehule
čt 3. 12. 2020 v 11:44 odesílatel Michael Krüger napsal: > Hi, > > Am 03.12.2020 um 11:01 schrieb Pavel Stehule : > > Hi > > čt 3. 12. 2020 v 10:32 odesílatel Michael Krüger > napsal: > >> Dear all, >> >> I need to find out the Oid of a custom type in C programming language. >> This type is defi

Re: psql > split > queries & output

2020-12-03 Thread Pavel Stehule
čt 3. 12. 2020 v 12:39 odesílatel Wim Bertels napsal: > Hello, > > psql shows (the queries and) the output, > there are for example the -L option and echo_queries option > > is there a way to run psql so that: > * inside psql there are no surprises :) (ignore this line:) > * one pipe (or..) to a

postgres-10 with FIPS

2020-12-03 Thread Aravindhan Krishnan
Hi Community, In our org, we are using postgres-10 and was installed by adding the source to apt and downloading postgres on top of ubuntu (currently using ubuntu 20.04.1) . We wanted to go for FIPS compliance for which we need to use the FIPS compliant packages of all the libraries / packages we

psql > split > queries & output

2020-12-03 Thread Wim Bertels
Hello, psql shows (the queries and) the output, there are for example the -L option and echo_queries option is there a way to run psql so that: * inside psql there are no surprises :) (ignore this line:) * one pipe (or..) to a file which only contains the statements (queries) history (and not the

Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path

2020-12-03 Thread Michael Krüger
Hi, > Am 03.12.2020 um 11:01 schrieb Pavel Stehule : > > Hi > > čt 3. 12. 2020 v 10:32 odesílatel Michael Krüger > napsal: > Dear all, > > I need to find out the Oid of a custom type in C programming language. This > type is defined in a schema, outside of the standard search path, e.g. publ

Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path

2020-12-03 Thread Pavel Stehule
Hi čt 3. 12. 2020 v 10:32 odesílatel Michael Krüger napsal: > Dear all, > > I need to find out the Oid of a custom type in C programming language. > This type is defined in a schema, outside of the standard search path, e.g. > public. > I know that I can call TypenameGetTypid to find out an Oid.

Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path

2020-12-03 Thread Michael Krüger
Dear all, I need to find out the Oid of a custom type in C programming language. This type is defined in a schema, outside of the standard search path, e.g. public. I know that I can call TypenameGetTypid to find out an Oid. But this is not working for me if the type is not in the public namespa