Re: Please tell me about character code conversion.

2021-06-03 Thread Tom Lane
=?iso-2022-jp?B?GyRCNVdMZyEhMCYbKEI=?= writes: > I would like to set my own character code conversion as DEFAULT CONVERSION. That's not an area of functionality that ever got fleshed out completely. What you're thinking about sounds like it'd work, but I'd strongly suggest experimenting in a

Re: Noinheritance with superuser

2021-06-03 Thread Tom Lane
saket bansal writes: > I have an RDS instance with the below configuration. > create role role1 login noinheritance; > grant rds_superuser to rdsdba; > grant rdsdba to role1 > In this case role1 is able to do all administrative operations, without the > need of switching to rdsdba. > Is this

Please tell me about character code conversion.

2021-06-03 Thread 久門 愛
Hi, Please tell me about character code conversion. I am currently using Postgres 13.3. I would like to set my own character code conversion as DEFAULT CONVERSION. Since there is a CONVERSION provided by Postgres by default, the following error will occur when executing CREATE CONVERSION.

Noinheritance with superuser

2021-06-03 Thread saket bansal
I have an RDS instance with the below configuration. create role role1 login noinheritance; grant rds_superuser to rdsdba; grant rdsdba to role1 In this case role1 is able to do all administrative operations, without the need of switching to rdsdba. Is this expected? I do not find any document

Re: Dropping dependent tables

2021-06-03 Thread Tiffany Thang
On Thu, Jun 3, 2021 at 10:18 AM Tom Lane wrote: > Tiffany Thang writes: > > I would like to write a SQL statement to drop all the tables owned by me > > but a problem I’m struggling with is with referential integrity. The > > statement I have now to generate the drop statements is > > > select

Re: possible license violations

2021-06-03 Thread Bruce Momjian
On Thu, Jun 3, 2021 at 06:08:42PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Thu, Jun 3, 2021 at 09:31:15PM +, tom.beacon wrote: > >> What is the best contact with whom to discuss possible violations of the > >> pgsql > >> license? > > > Uh, good question, and I could not find

inner subprograms ... Was: syntax question

2021-06-03 Thread Bryn Llewellyn
> br...@momjian.us wrote: > > Oh, I thought he wanted to declare a function inside the function that could > be called only by that function, like private functions in Oracle packages > can do. Yes, you can create a function that defines a function that can be > called later. I guess you

Re: arbitrary "interval" expression OK with "at time zone" but not with "set time zone" — Why?

2021-06-03 Thread Bryn Llewellyn
Thanks, as ever, Tom, for the quick response. I’ll summarize your explanation as “Yes, there is indeed a logical parsing paradox”. Or, as you said, as “the SQL Standard committee—the gift that keeps on giving”. > Tom wrote: > >> Bryn wrote: >> >> The "at time zone" clause that can decorate a

Re: possible license violations

2021-06-03 Thread Tom Lane
Bruce Momjian writes: > On Thu, Jun 3, 2021 at 09:31:15PM +, tom.beacon wrote: >> What is the best contact with whom to discuss possible violations of the >> pgsql >> license? > Uh, good question, and I could not find the answer easily. I would > report it to the owners of the Postgres

Re: possible license violations

2021-06-03 Thread Bruce Momjian
On Thu, Jun 3, 2021 at 09:31:15PM +, tom.beacon wrote: > What is the best contact with whom to discuss possible violations of the pgsql > license? Uh, good question, and I could not find the answer easily. I would report it to the owners of the Postgres trademark:

Re: arbitrary "interval" expression OK with "at time zone" but not with "set time zone" — Why?

2021-06-03 Thread Tom Lane
Bryn Llewellyn writes: > The "at time zone" clause that can decorate a timetsamp[tz] value seems > to allow an argument that’s an arbitrary expression that yields a value > whose data type is "interval". AT TIME ZONE is part of the SQL expression syntax, thus it's unsurprising that its arguments

Re: arbitrary "interval" expression OK with "at time zone" but not with "set time zone" — Why?

2021-06-03 Thread Adrian Klaver
On 6/3/21 2:40 PM, Bryn Llewellyn wrote: The "at time zone" clause that can decorate a timetsamp[tz] value seems to allow an argument that’s an arbitrary expression that yields a value whose data type is "interval". Here’s a contrived exotic example: select '2021-05-21 12:00:00

Re: syntax question

2021-06-03 Thread Marc Millas
no pb: I am french, so quite skilled on that topic :-) there is only 50 bottles of various malt on the presentoir close to my desk so I must stay reasonnable :-) Marc MILLAS Senior Architect +33607850334 www.mokadb.com On Thu, Jun 3, 2021 at 11:17 PM Adrian Klaver wrote: > On 6/3/21 1:01

arbitrary "interval" expression OK with "at time zone" but not with "set time zone" — Why?

2021-06-03 Thread Bryn Llewellyn
The "at time zone" clause that can decorate a timetsamp[tz] value seems to allow an argument that’s an arbitrary expression that yields a value whose data type is "interval". Here’s a contrived exotic example: select '2021-05-21 12:00:00 UTC'::timestamptz at time zone ('2015-05-21

Re: BUG #17046: Upgrade postgres 11 to 13 version

2021-06-03 Thread Adrian Klaver
On 6/3/21 5:53 AM, Ram Pratap Maurya wrote: Hi Team, I am creating new server and installed postgres -13 and take PG_BACKUP form current PRD server (PG version 11) and restore DB on PG-13 server. can you suggest if we doing upgrade by this activity there is any issue. When doing this you

possible license violations

2021-06-03 Thread tom.beacon
What is the best contact with whom to discuss possible violations of the pgsql license? Sent with [ProtonMail](https://protonmail.com) Secure Email.

LZ4 missing in pg14-beta1 Windows build, OLD VS/compiler used

2021-06-03 Thread Hans Buschmann
I tried to test a customer case of using bytea columns with the new lz4 compression. But lz4 support is not included in the standard binaries downloadable through the PostreSQL Website (from EDB). For easy testing with windows this should be enabled in the upcoming releases of pg14: not

RE: BUG #17046: Upgrade postgres 11 to 13 version

2021-06-03 Thread Ram Pratap Maurya
Hi Team, I am creating new server and installed postgres -13 and take PG_BACKUP form current PRD server (PG version 11) and restore DB on PG-13 server. can you suggest if we doing upgrade by this activity there is any issue. Regards, Ram Pratap. -Original Message- From: David

Re: syntax question

2021-06-03 Thread Adrian Klaver
On 6/3/21 1:01 PM, Marc Millas wrote: thanks Adrian, exactly what I was missing :-) about knowing if I should... We have to create a set of triggers (insert, update, delete) within a huge set of tables. and that list of tables, and structure of them  can be customized, maintained, ... so we

Re: index unique

2021-06-03 Thread Marc Millas
Hi Paul, obviously the bounding box is not a perfect choice. we also think of one of the "centers" point, but quite similar non uniqueness. so, if no "tech" solution, we continue to work with the business to try to find an appropriate PK thanks Marc MILLAS Senior Architect +33607850334

Re: syntax question

2021-06-03 Thread Guyren Howe
I know it would be non-standard, but I would love to see Postgres support the likes of nested functions. I know that would be non-standard, but Postgres has lots of non-standard features that make it more like a real programming language and considerably more productive. On Jun 3, 2021, 12:34

Re: index unique

2021-06-03 Thread Paul Ramsey
Primary key is going to be a BTREE index. I'm surprised you require the geometry in order to achieve uniqueness? You can't put the geometry into a BTREE because it's too large. You could add a column and stick the MD5 hash of the geometry there, and use that as the last piece of uniqueness? If

Re: syntax question

2021-06-03 Thread Marc Millas
I take note of this. thanks Marc MILLAS Senior Architect +33607850334 www.mokadb.com On Thu, Jun 3, 2021 at 10:23 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Thu, Jun 3, 2021 at 1:02 PM Marc Millas wrote: > >> about knowing if I should... >> We have to create a set of

index unique

2021-06-03 Thread Marc Millas
Hi, postgres 12 with postgis. on a table we need a primary key and to get a unique combinaison, we need 3 columns of that table: 1 of type integer, 1 of type text, 1 of type geometry creating the PK constraint doesn work: (even with our current small data set) *ERROR: index row size 6072

Re: syntax question

2021-06-03 Thread David G. Johnston
On Thu, Jun 3, 2021 at 1:02 PM Marc Millas wrote: > about knowing if I should... > We have to create a set of triggers (insert, update, delete) within a huge > set of tables. and that list of tables, and structure of them can be > customized, maintained, ... > so we were looking for a standard

Re: syntax question

2021-06-03 Thread Marc Millas
thanks Adrian, exactly what I was missing :-) about knowing if I should... We have to create a set of triggers (insert, update, delete) within a huge set of tables. and that list of tables, and structure of them can be customized, maintained, ... so we were looking for a standard script to

Re: syntax question

2021-06-03 Thread Marc Millas
good reading, thanks Marc MILLAS Senior Architect +33607850334 www.mokadb.com On Thu, Jun 3, 2021 at 9:21 PM Tom Lane wrote: > Adrian Klaver writes: > > On 6/3/21 12:01 PM, Bruce Momjian wrote: > >> On Thu, Jun 3, 2021 at 08:58:03PM +0200, Marc Millas wrote: > >>> within a function, I want

Re: syntax question

2021-06-03 Thread Bruce Momjian
On Thu, Jun 3, 2021 at 03:21:15PM -0400, Tom Lane wrote: > Adrian Klaver writes: > > On 6/3/21 12:01 PM, Bruce Momjian wrote: > >> On Thu, Jun 3, 2021 at 08:58:03PM +0200, Marc Millas wrote: > >>> within a function, I want to create another function. > > >> You can't create functions inside of

Re: max_connections

2021-06-03 Thread Vijaykumar Jain
and this one as well. just to keep it in the thread. Improving Postgres Connection Scalability: Snapshots - Microsoft Tech Community On Fri, 4 Jun 2021 at

Re: syntax question

2021-06-03 Thread Tom Lane
Adrian Klaver writes: > On 6/3/21 12:01 PM, Bruce Momjian wrote: >> On Thu, Jun 3, 2021 at 08:58:03PM +0200, Marc Millas wrote: >>> within a function, I want to create another function. >> You can't create functions inside of functions; same for procedures. > Sure you can: Yeah. The actual

Re: syntax question

2021-06-03 Thread Adrian Klaver
On 6/3/21 12:01 PM, Bruce Momjian wrote: On Thu, Jun 3, 2021 at 08:58:03PM +0200, Marc Millas wrote: Hi, within a function, I want to create another function. no pb. but if I write: declare bidule text; begin bidule:='myfunc'; create function bidule() ... it does create a function named

Re: syntax question

2021-06-03 Thread Bruce Momjian
On Thu, Jun 3, 2021 at 08:58:03PM +0200, Marc Millas wrote: > Hi, > > within a function, I want to create another function. > no pb. > but if I write: > declare bidule text; > begin > bidule:='myfunc'; > create function bidule() ... > > > it does create a function named bidule and not myfunc.

syntax question

2021-06-03 Thread Marc Millas
Hi, within a function, I want to create another function. no pb. but if I write: declare bidule text; begin bidule:='myfunc'; create function bidule() ... it does create a function named bidule and not myfunc. so I am obviously missing something too obvious. can someone help ? thanks Marc

Re: max_connections

2021-06-03 Thread Vijaykumar Jain
ok, running too many connections without recycling has an overhead. no wonder pgbouncer is all over as a sidecar :) In case anyone is interested, this blog is a great read. Analyzing the Limits of Connection Scalability in Postgres - Microsoft Tech Community

Re: Dropping dependent tables

2021-06-03 Thread Tom Lane
Tiffany Thang writes: > I would like to write a SQL statement to drop all the tables owned by me > but a problem I’m struggling with is with referential integrity. The > statement I have now to generate the drop statements is > select 'drop table '||tablename||' cascade;' from pg_tables where >

Dropping dependent tables

2021-06-03 Thread Tiffany Thang
Hi, I would like to write a SQL statement to drop all the tables owned by me but a problem I’m struggling with is with referential integrity. The statement I have now to generate the drop statements is select 'drop table '||tablename||' cascade;' from pg_tables where tableowner=''; The