Re: Primary keys and composite unique keys(basic question)

2021-04-01 Thread Hemil Ruparel
I used uuid4 for customer ids because i needed to interface with payment providers. Is that wrong? All other places except transaction ids, i have used serial ints On Fri 2 Apr, 2021, 8:56 AM Rob Sargent, wrote: > On 4/1/21 8:28 PM, Merlin Moncure wrote: > > > > This is one of the great debates

Re: How to post to this mailing list from a web based interface

2021-01-28 Thread Hemil Ruparel
> Gmail is a web interface... :) I was gonna say that Ron, but I figured it would not be polite to say the least

Re: ubuntu 18: PostgreSQL does not start. how can I totally remove and reinstall it

2021-01-23 Thread Hemil Ruparel
One small note. Aside from the fact that your server is running from a different port, psycopg2 does not support authentication without password afaik. It has bit me twice On Sun, Jan 24, 2021 at 12:34 PM Julien Rouhaud wrote: > On Sun, Jan 24, 2021 at 2:58 PM rob...@redo2oo.ch > wrote: > > > >

Re: Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
In my frustration* On Sat, Jan 16, 2021 at 1:24 PM Hemil Ruparel wrote: > In my furstration, I never thought about the self moderation effect. > Thanks Tim > > On Sat, Jan 16, 2021 at 1:14 PM Tim Cross wrote: > >> >> Hemil Ruparel writes: >> >> > Exa

Re: Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
In my furstration, I never thought about the self moderation effect. Thanks Tim On Sat, Jan 16, 2021 at 1:14 PM Tim Cross wrote: > > Hemil Ruparel writes: > > > Exactly my point. We need to raise the bar of the behavior we tolerate. > > This should not be tolerated. We n

Re: Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
Okay. I will not reply to them. Enough mental cycles wasted On Sat, Jan 16, 2021 at 1:11 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Friday, January 15, 2021, Hemil Ruparel > wrote: > >> I am not asking people to get banned the moment they ask easy

Re: Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
us wrote: > >> >> >> > On Jan 15, 2021, at 22:19, Hemil Ruparel >> wrote: >> > >> > I have no problems if there are one or two questions which are exactly >> the same. I give them the benefit of doubt. What I won't tolerate are >

Re: Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
gt; We see these flare ups almost as frequently as the repetition of the "tune > pg tool" request. They die out pretty quickly especially when an obvious > expert declines to waste any more of the offender's (offended's) time. > > > On 1/15/21 10:51 PM, Hemil Ruparel wr

Re: Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
I agree. That's why I proposed to guide such people as the first attempt giving them the benefit of the doubt. On Sat, Jan 16, 2021 at 11:52 AM Christophe Pettus wrote: > > > > On Jan 15, 2021, at 22:19, Hemil Ruparel > wrote: > > > > I have no problems if ther

Re: Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
ettus wrote: > > > > On Jan 15, 2021, at 22:10, Hemil Ruparel > wrote: > > > > I fear that mailing lists become like quora. > > pgsql-general is almost old enough to drink. :) The very first message I > could find with a reliable date is from 31 May 2000. I thi

Re: Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
> > > > On Jan 15, 2021, at 21:51, Hemil Ruparel > wrote: > > It's my personal opinion. But i personally do not want to deal with > entitled people who cannot do basic google searches. > > Well, I have to mention that you don't have to deal with them. It mi

Re: Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
I will send them a mail anyway. Lets see their response On Sat, Jan 16, 2021 at 11:30 AM Hemil Ruparel wrote: > I don't know on what basis should the complaint be made other than the > peron's entitlement > > On Sat, Jan 16, 2021 at 11:24 AM Christophe Pettus > wrot

Re: Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
I don't know on what basis should the complaint be made other than the peron's entitlement On Sat, Jan 16, 2021 at 11:24 AM Christophe Pettus wrote: > > > > On Jan 15, 2021, at 21:51, Hemil Ruparel > wrote: > > > > This is a meta discussion. I coul

Do we need a way to moderate mailing lists?

2021-01-15 Thread Hemil Ruparel
This is a meta discussion. I couldn't find a meta mailing list so I am posting it here. This discussion sparked from this message . We should clearly mention on the postgres ma

Re: Best tools to monitor and fine tune postgres

2021-01-15 Thread Hemil Ruparel
If you want answers everytime no matter how stupid they are, my price is $40/hour. We can negotiate how much of my time you are allowed to waste. This is my personal time I am spending on replying. Plus, you are probably working for a company which uses postgres but doesn't even care to provide pro

Re: Best tools to monitor and fine tune postgres

2021-01-15 Thread Hemil Ruparel
rthy of an answer. We call people like this “losers” (and for historical reasons we sometimes spell it “lusers”). ``` On Fri, Jan 15, 2021 at 10:01 PM Hemil Ruparel wrote: > http://catb.org/~esr/faqs/smart-questions.html > > On Fri, Jan 15, 2021 at 9:58 PM Atul Kumar wrote: > &g

Re: Best tools to monitor and fine tune postgres

2021-01-15 Thread Hemil Ruparel
http://catb.org/~esr/faqs/smart-questions.html On Fri, Jan 15, 2021 at 9:58 PM Atul Kumar wrote: > And basically you are improving your knowledge as you are expecting those > questions the answers of which you dont know about. > > Thats why you seem to not to be helpful and somehow stopping othe

Re: Best tools to monitor and fine tune postgres

2021-01-15 Thread Hemil Ruparel
People in any mailing lists are not free consultants. They expect their time to be valued and they expect the OP to at least do some research before posting On Fri, Jan 15, 2021 at 9:56 PM Hemil Ruparel wrote: > Refer to this page for archives: https://www.postgresql.org/list/ > > On

Re: Best tools to monitor and fine tune postgres

2021-01-15 Thread Hemil Ruparel
Refer to this page for archives: https://www.postgresql.org/list/ On Fri, Jan 15, 2021 at 9:55 PM Atul Kumar wrote: > Again Thanks alot David for ur response. > > You expect everyone to be perfect which cannot happen. > > And related to thread, if someone has joined this thread today then it is

Re: Dynamic procedure execution

2020-12-14 Thread Hemil Ruparel
Not to be disrespectful, but you need to at least struggle to find the answers yourself before posting here. On Mon, Dec 14, 2020 at 12:02 PM Muthukumar.GK wrote: > Hi David, > > As I am not bit Clea, let me know what I have to do. If possible, please > re- write my program. > > Regards > Muthu

Re: PL/java

2020-12-07 Thread Hemil Ruparel
I want to say this. I never liked any extension language. It's like Java is not meant to interact with databases. Nor is python (in my opinion). I think you should skip the search On Mon, Dec 7, 2020 at 8:15 PM Adrian Klaver wrote: > On 12/7/20 3:25 AM, Zé Rui Marques wrote: > > Hi, > > > > I am

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Hemil Ruparel
Did you restart postgres after changing pg_hba.conf? On Sat, Dec 5, 2020 at 11:56 AM Muthukumar.GK wrote: > Hi Nicklas, > > I have added a line "host all all 0.0.0.0/0 md5" in > Pg_hba_conf.sample file and restarted postgres server. porstgres port has > been added in windows firewall (Windo

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Hemil Ruparel
lol. Been there. Done that On Sat, Dec 5, 2020 at 1:36 AM Nicklas Avén wrote: > > > On 4 December 2020 17:17:48 CET, Adrian Klaver > wrote: > >On 12/4/20 8:03 AM, Paul Förster wrote: > >> Hi Adrian, > >> > >>> On 04. Dec, 2020, at 16:13, Adrian Klaver > > wrote: > >>> That is the wrong file, th

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Hemil Ruparel
using pgadmin4 tool. > > On Fri, Dec 4, 2020 at 5:26 PM Hemil Ruparel > wrote: > >> Are you sure you restarted postgres after the change in configuration? >> >> On Fri, Dec 4, 2020 at 3:58 PM Muthukumar.GK >> wrote: >> >>> Hi Team, >>> >>&

Re: Accessing Postgres Server and database from other Machine

2020-12-04 Thread Hemil Ruparel
Are you sure you restarted postgres after the change in configuration? On Fri, Dec 4, 2020 at 3:58 PM Muthukumar.GK wrote: > Hi Team, > > I have created Database in postgresqlv13 . My Office colleague needs to > access my postgres server and database from his machine. There is a config > file ca

Re: Calling Procedure from another procedure in Postgres

2020-12-02 Thread Hemil Ruparel
insert into is not valid On Wed, Dec 2, 2020 at 3:50 PM Muthukumar.GK wrote: > Hi team, > > I need to call the procedure(not function) and insert the records into a > temporary table from another procedure in postgres. When executing the > procedure 'Sampleproc2',I got some below syntax error.

Re: How to debug authentication issues in Postgres

2020-12-01 Thread Hemil Ruparel
, 2020 at 4:38 PM Daniele Varrazzo wrote: > IIRC you need libpq at least 10 to use password encryption other than md5. > Maybe your java client uses an older version, or no libpq at all and the > client library misses that feature? > > -- Daniele > > > On Sat, 28 Nov 2

Re: FDW using remote ODBC driver

2020-12-01 Thread Hemil Ruparel
t; > Question has been if the SQL-Server ODBC driver can also be installed on > the remote Windows Server in that case. > > > > -Markus > > > > > > > > *Von:* Hemil Ruparel > *Gesendet:* Dienstag, 1. Dezember 2020 16:17 > *An:* Zwettler Markus (OIZ)

Re: FDW using remote ODBC driver

2020-12-01 Thread Hemil Ruparel
that case? > > > > > > > > *Von:* Hemil Ruparel > *Gesendet:* Dienstag, 1. Dezember 2020 16:08 > *An:* Zwettler Markus (OIZ) > *Cc:* pgsql-general@lists.postgresql.org > *Betreff:* Re: FDW using remote ODBC driver > > > > Yes. The driver needs to be on the client &g

Re: FDW using remote ODBC driver

2020-12-01 Thread Hemil Ruparel
Yes. The driver needs to be on the client On Tue, Dec 1, 2020 at 8:34 PM Zwettler Markus (OIZ) < markus.zwett...@zuerich.ch> wrote: > Hi, > > > > Can I create a FDW connection using an ODBC driver which is installed on a > remote host, e.g. > > > > Postgres@Linux è FDW è ODBC@Windows è SQL-Server

Re: pgdump version mismatch error. server version: 13.0; pg_dump version: 12.4

2020-11-28 Thread Hemil Ruparel
Download postgres 13. pg dump 13 will be downloaded along with it On Sun, Nov 29, 2020 at 11:02 AM mark armon <1994hej...@gmail.com> wrote: > > where to get pg_dump 13.0? > > On Sat, Nov 28, 2020 at 9:47 PM Adrian Klaver > wrote: > >> On 11/28/20 8:12 AM, mark armon wrote: >> > >> > OS: Windows

Re: How to debug authentication issues in Postgres

2020-11-28 Thread Hemil Ruparel
Thanks. I will On Sat, Nov 28, 2020 at 9:49 PM Adrian Klaver wrote: > On 11/28/20 8:11 AM, Hemil Ruparel wrote: > > I am unable to connect using Java in general. And DataGrip runs on Java > > as far as I know. My backend in python runs perfectly fine using the > > psyco

Re: How to debug authentication issues in Postgres

2020-11-28 Thread Hemil Ruparel
: > On 11/28/20 6:10 AM, Hemil Ruparel wrote: > > Line 88 is this line: hostdatabaseuser 0.0.0.0/0 > > <http://0.0.0.0/0> scram-sha-256. > > > > I might have forgotten to change one of the names in the earlier mails. > > > > Cha

Re: How to debug authentication issues in Postgres

2020-11-28 Thread Hemil Ruparel
This seems extremely odd. I can connect to my database using python's psycopg2 library. Most likely this is either an extremely stupid mistake on my side, or worst case some edge condition jdbc doesnt handle? On Sat, Nov 28, 2020 at 7:40 PM Hemil Ruparel wrote: > Line 88 is this li

Re: How to debug authentication issues in Postgres

2020-11-28 Thread Hemil Ruparel
Line 88 is this line: hostdatabaseuser 0.0.0.0/0 scram-sha-256. I might have forgotten to change one of the names in the earlier mails. On Sat, Nov 28, 2020 at 7:38 PM Hemil Ruparel wrote: > I commented out scram-sha-256 lines for IPv4 and IPv6. I still

Re: How to debug authentication issues in Postgres

2020-11-28 Thread Hemil Ruparel
5" On Sat, Nov 28, 2020 at 7:34 PM Hemil Ruparel wrote: > Yes. Password encryption is set to scram-sha-256. > > On Fri, Nov 27, 2020 at 10:36 PM Adrian Klaver > wrote: > >> On 11/27/20 12:37 AM, Hemil Ruparel wrote: >> > The log says: >> >

Re: How to debug authentication issues in Postgres

2020-11-28 Thread Hemil Ruparel
Yes. Password encryption is set to scram-sha-256. On Fri, Nov 27, 2020 at 10:36 PM Adrian Klaver wrote: > On 11/27/20 12:37 AM, Hemil Ruparel wrote: > > The log says: > > > FATAL: password authentication failed for user "centos" > > > DETAIL: Connecti

Re: How to debug authentication issues in Postgres

2020-11-27 Thread Hemil Ruparel
I will try that. I do not have access to the computer right now On Fri 27 Nov, 2020, 9:25 PM Tom Lane, wrote: > Hemil Ruparel writes: > > Thanks for the clarification. According to this page, > > https://jdbc.postgresql.org/documentation/changelog.html#version_42.2.0, > &

Re: How to debug authentication issues in Postgres

2020-11-27 Thread Hemil Ruparel
Lane wrote: > Hemil Ruparel writes: > > When I try to connect to the database, the log says: > >> FATAL: password authentication failed for user "user" > >> DETAIL: Connection matched pg_hba.conf line 88: "hostuser > > password 0.0.0.0

Re: How to debug authentication issues in Postgres

2020-11-27 Thread Hemil Ruparel
am-sha-256 On Fri, Nov 27, 2020 at 8:45 PM Hemil Ruparel wrote: > The database has been upgraded > > On Fri, Nov 27, 2020 at 8:41 PM Adrian Klaver > wrote: > >> On 11/27/20 7:01 AM, Hemil Ruparel wrote: >> > I don't quite get what you mean by upgrading to scram-sha2

Re: How to debug authentication issues in Postgres

2020-11-27 Thread Hemil Ruparel
The database has been upgraded On Fri, Nov 27, 2020 at 8:41 PM Adrian Klaver wrote: > On 11/27/20 7:01 AM, Hemil Ruparel wrote: > > I don't quite get what you mean by upgrading to scram-sha256. I > > installed postgres 13. I haven't upgraded anything yet. > &

Re: How to debug authentication issues in Postgres

2020-11-27 Thread Hemil Ruparel
ers set new passwords, and change the authentication method > specifications in pg_hba.conf to scram-sha-256. > > > > > > > > -Markus > > > > > > > > *Von:* Hemil Ruparel > *Gesendet:* Freitag, 27. November 2020 09:38 > *An:* Laurenz Albe > *Cc:*

Re: How to debug authentication issues in Postgres

2020-11-27 Thread Hemil Ruparel
nect without problems using the same password On Fri, Nov 27, 2020 at 1:46 PM Hemil Ruparel wrote: > Sorry. This was the replication section: > local replication all peer > hostreplication all 127.0.0.1/32 > scram-sha-256 &g

Re: How to debug authentication issues in Postgres

2020-11-27 Thread Hemil Ruparel
: > On Fri, 2020-11-27 at 13:34 +0530, Hemil Ruparel wrote: > > I have restarted postgres quite a few times to try making configuration > changes and it > > is always back up. I don't know how. Feels weird to me. I didn't add > the line > > "local replication

Re: How to debug authentication issues in Postgres

2020-11-27 Thread Hemil Ruparel
ri, 2020-11-27 at 12:44 +0530, Hemil Ruparel wrote: > > I have a remote database which I can connect to using psql command line > tool as well as PgAdmin4. But I would really like to use DataGrip. But > whenever I try to connect, it gives me fatal: password > > authentication fail

How to debug authentication issues in Postgres

2020-11-26 Thread Hemil Ruparel
I have a remote database which I can connect to using psql command line tool as well as PgAdmin4. But I would really like to use DataGrip. But whenever I try to connect, it gives me fatal: password authentication failed and prompts me for another password. I raised an issue in DataGrip and I was to

Re: Postgresql13-devel fails to install on centos 7

2020-11-18 Thread Hemil Ruparel
Thanks a lot. I really hope it helps newbies like myself save a bunch of time On Wed 18 Nov, 2020, 2:50 PM Devrim Gündüz, wrote: > > Hi, > > On Wed, 2020-11-18 at 13:45 +0530, Hemil Ruparel wrote: > > Had to run this command: > > > > yum install > > https:

Re: Postgresql13-devel fails to install on centos 7

2020-11-18 Thread Hemil Ruparel
Had to run this command: yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install llvm5.0-devel And then it worked :) On Wed, Nov 18, 2020 at 1:26 PM Hemil Ruparel wrote: > I am trying to install postgres13-devel on a centos 7 server. But I

Postgresql13-devel fails to install on centos 7

2020-11-17 Thread Hemil Ruparel
I am trying to install postgres13-devel on a centos 7 server. But I am getting this error message: Error: Package: postgresql13-devel-13.1-1PGDG.rhel7.x86_64 (pgdg13) Requires: llvm5.0-devel >= 5.0 After a bit of googling, and following these instructions

Re: How to migrate column type from uuid to serial

2020-10-10 Thread Hemil Ruparel
oh. I get it now. Thanks On Sat, Oct 10, 2020 at 3:41 PM Peter J. Holzer wrote: > On 2020-10-10 11:31:23 +0200, Peter J. Holzer wrote: > > On 2020-10-07 20:10:34 +0530, Hemil Ruparel wrote: > > > Sorry if this is silly but if it is a 128 bit number, why do we need 32 &

Re: How to migrate column type from uuid to serial

2020-10-07 Thread Hemil Ruparel
te to using a serial int instead as the primary key., On Wed, Oct 7, 2020 at 10:48 PM Francisco Olarte wrote: > Hemil: > > On Wed, Oct 7, 2020 at 2:49 PM Hemil Ruparel > wrote: > > I was integrating a payment gateway for my app when I noticed its > maximum length of custome

Re: How to migrate column type from uuid to serial

2020-10-07 Thread Hemil Ruparel
8:10 PM Hemil Ruparel wrote: > Sorry if this is silly but if it is a 128 bit number, why do we need 32 > characters to represent it? Isn't 8 bits one byte? > > On Wed, Oct 7, 2020 at 8:08 PM Thomas Kellerer wrote: > >> Hemil Ruparel schrieb am 07.10.2020 um 16:21: &

Re: How to migrate column type from uuid to serial

2020-10-07 Thread Hemil Ruparel
Sorry if this is silly but if it is a 128 bit number, why do we need 32 characters to represent it? Isn't 8 bits one byte? On Wed, Oct 7, 2020 at 8:08 PM Thomas Kellerer wrote: > Hemil Ruparel schrieb am 07.10.2020 um 16:21: > > it is declared as uuid. But how does it occupy

Re: How to migrate column type from uuid to serial

2020-10-07 Thread Hemil Ruparel
umm it is declared as uuid. But how does it occupy only 16 bytes? Even if we remove those 4 dashes thats 32 bytes of text right? I am not concerned about the size at all. How do i send it as a string below 32 bytes? On Wed, Oct 7, 2020 at 7:37 PM Thomas Kellerer wrote: > Hemil Ruparel schr

Re: How to migrate column type from uuid to serial

2020-10-07 Thread Hemil Ruparel
Yes the id is stored as a uuid. Thanks for the suggestion. Should work On Wed, Oct 7, 2020 at 7:29 PM Adrian Klaver wrote: > On 10/7/20 6:58 AM, Hemil Ruparel wrote: > > Please reply to list also. > Ccing list > > > Yes. The id is stored as uuid. Thanks for the su

How to migrate column type from uuid to serial

2020-10-07 Thread Hemil Ruparel
I was integrating a payment gateway for my app when I noticed its maximum length of customer id string is 32. SIze of UUID is 36 (32 characters and 4 dashes). So I want to change the type of customer id to serial. The problem is by now, the column is being used at many places. How to migrate the co

How to update a table with the result of deleting rows in another table

2020-10-05 Thread Hemil Ruparel
I am trying to delete orders for a given customer on a given date and add the cost of those orders to credit for the customer. So far, I came up with this: ``` with data as ( delete from orders where customer_id = and date = '2020-10-05' returning price ), total as ( select su

Re: Are advisory locks guaranteed to be First Come First Serve? And can the behavior be relied upon?

2020-08-27 Thread Hemil Ruparel
Thanks a lot On Thu 27 Aug, 2020, 12:23 PM Laurenz Albe, wrote: > On Thu, 2020-08-27 at 10:10 +0530, Hemil Ruparel wrote: > > I was playing with Advisory locks. I opened three connections to the > database And obtained > > a lock with the same key. I noticed that the locks we

Are advisory locks guaranteed to be First Come First Serve? And can the behavior be relied upon?

2020-08-26 Thread Hemil Ruparel
I was playing with Advisory locks. I opened three connections to the database And obtained a lock with the same key. I noticed that the locks were obtained in the order of requests. I was wondering whether the locks are guaranteed to be First Come First Serve and can this behaviour be relied upon.