Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8MgG-0004fo-KN for pgsql-sql@arkaria.postgresql.org; Thu, 12 Sep 2019 10:50:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i8MgF-0006Jx-Im for pgsql-sql@arkaria.postgresql.org; Thu, 12 Sep 2019 10:50:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8MgE-0006JX-O2 for pgsql-sql@lists.postgresql.org; Thu, 12 Sep 2019 10:50:27 +0000 Received: from sonic315-15.consmr.mail.bf2.yahoo.com ([74.6.134.125]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i8MgB-0003Vn-Ut for pgsql-sql@lists.postgresql.org; Thu, 12 Sep 2019 10:50:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1568285422; bh=tFl3LCAHeKleBw1akh1Y1l8Wy3Hmgqz4ngbCPRBU8YQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=dNB7JnYi8kVuunxGtnNpV/xrrCh6zsG1/sTMcgRBf08nC+aqcjRtJpnNwwDbsl7r0jJK9Y+4TU54P9IIsVJxai6KPvYlO81o9FUMkQ/tLh3gDkOAOCuR8nNsHV7+oC8OUvhV3KWuV4gKpZIZBfspP31Djx5CtP1rxQvQEeFV7EnrO7+QpURiXs7UnvZi0lmRLHUbhzW4mikVmpzoXMCbc3ydXsUBACPRT5CsldjGv5D/IFqolBj9FIx9L8iyDKuDKulAK3M8M8cgFRYgAHRgXS1TXfmk+uuART7bJIhH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2EJgmvkn1R7MhRxx2rnp9PlI_eawp2wiiBmZck luri9GCdfQHROeaNYrJ557Re1gIv6k04OEAb._64JBdUuyl2okQhGQ1QbFcJc2tHXrW5p_mqX8ko UrCe8qwL5wjdutdDvDjmg.4xrmkeTg9nZeLhEeympZTSgvW4K8_R1Sf4lzDCRDIlrpoXoNgZDIUl ajEvcUGGMYRpigo14Y8Y27tNi9J8lUwaX8_utb.O3S9PQ5MXZoBVleC7GADMR5eLSIKD9Uig090h rvwgW_MQ8c0JviX7kVhFmHu2UxKlNnYKvyNo0ZuIvO8.r9bMt6_O1jtgkrbs- Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Thu, 12 Sep 2019 10:50:22 +0000 Date: Thu, 12 Sep 2019 10:50:19 +0000 (UTC) From: Karen Goh To: Steve Midgley Cc: pgsql-sql@lists.postgresql.org Message-ID: <1105744936.4152325.1568285419687@mail.yahoo.com> In-Reply-To: References: <207445330.2444743.1567859173939@mail.yahoo.com> <27D5F961-0A53-4819-9558-B2C685D0AB30@gmail.com> <1282323688.2470443.1567868674196@mail.yahoo.com> <2B0FF25B-F26A-4FA5-9CD6-D58AF5A534EB@gmail.com> <1179111273.2587909.1567915911716@mail.yahoo.com> <53C1E987-E6CD-45D2-8299-4E23D6A6C9D4@gmail.com> <642386474.2839394.1568005604966@mail.yahoo.com> Subject: Re: How do I enabled Windows 10 to be able to run PSQL etc MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4152324_430930693.1568285419685" Content-Length: 9099 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_4152324_430930693.1568285419685 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =20 Hi Steve, What I did was I manually created the table and then pgAdmin4 then allowed = me to use a script to insert the columns ! Anyway, now my problem is that i get a=20 org.postgresql.util.PSQLException: ERROR: null value in column "parent_id" = violates not-null constraint I'd like to know since I have already made parent_id a primary key, do I ne= ed to put a idenity as ALWAYS and increment by 1 ? cos another table I had used pgAdmin4 to define it as identity, ALWAYS, inc= rement 1 and it works well.... so what is the difference between identity and PRIMARY KEY ? and if I follow the other table definition for id and put in the ALWAYS, it= will give me another problem...that the generated_id doesn't get inserted = even though it should not=20 Another problem is that I found most 'developers' are using psql and don't = know what I am talking when relating PGAdmin4 problem but I just can't get = PSQL to work... On Monday, September 9, 2019, 11:08:18 PM GMT+8, Steve Midgley wrote: =20 =20 =20 On Mon, Sep 9, 2019 at 6:07 AM Karen Goh wrote: Hi Rob, I refer to your comment - I think you need to add =E2=80=9Cmembership=E2=80=9D to your pgadmin connec= tion string. How do I add in the pgadmin connection string at pgAdmin4 ? Before that, I was creating table using the sql script in version 10 and th= ere was no problem at all. So, it really baffled me it is not working out this time. And tomorrow I have an important demo and it seems that I have to take out = this table in my app to show...which will be less impressive in a not so im= pressive app that i have created ....:( I have made some more screenshots which shows some more error when I tried = to retrieve the table under the table postgres which is already created not= it is not showing the table. Please help, Your second screenshot seems to indicate your connection between PgAdmin an= d Pg 11 Server is broken in some ways. If I were taking over the keyboard a= t your workstation and had a critical deadline for tomorrow, here are some = steps I would take: =20 - Dump my databases, if I can =20 - Backup whatever work I have on a usb stick (create sql files, etc) - Uninstall Pg Server and Pg Admin - Reinstall and see if things start working better Then on more detailed level, my understanding of Postgres is that when you = prefix a word in front of a table you are referring to a schema so=20 create table membership.parents... Will never work unless you first create the schema that parents sit within:= create schema membership Is it possible your problem is that you aren't creating membership schema i= n your database? (Postgres treats schemas in much the same way that other d= atabase engines treat actual databases). Finally, if you are desperate for a working Pg SQL server over the next 24 = hours consider spinning up an AWS RDS Pg instance and connecting PgAdmin to= that - that way you know the database is reliable and correctly configured= for sure. There might even be a "free tier" that gives you free service fo= r that time frame.. Steve =20 ------=_Part_4152324_430930693.1568285419685 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Steve,

What I did was I manually created= the table and then pgAdmin4 then allowed me to use a script to insert the = columns !

Anyway, now my problem is that i get a

org.postgre= sql.util.PSQLException: ERROR: null value in column "parent_id" v= iolates not-null constraint

I'd like to know since I have alread= y made parent_id a primary key, do I need to put a idenity as ALWAYS and in= crement by 1 ?

cos another table I had used pgAdmin4 to define it as= identity, ALWAYS, increment 1 and it works well....

so what is the = difference between identity and PRIMARY KEY ?

and if I follow the ot= her table definition for id and put in the ALWAYS, it will give me another = problem...that the generated_id doesn't get inserted even though it sho= uld not

Another problem is that I found most 'developers' a= re using psql and don't know what I am talking when relating PGAdmin4 p= roblem but I just can't get PSQL to work...
=
= On Monday, September 9, 2019, 11:08:18 PM GMT+8, Steve Midgley <science= @misuse.org> wrote:

=



On Mon, Sep 9, 2019 at 6:07 AM Karen Goh <karenworld@yahoo.com&= gt; wrote:
Hi Rob,

I refer to your comment -
I think you= need to add =E2=80=9Cmembership=E2=80=9D to your pgadmin connection string= .

How do I add in the pgadmin connecti= on string at pgAdmin4 ?

Before that, I= was creating table using the sql script in version 10 and there was no pro= blem at all.

So, it really baffled me = it is not working out this time.

And t= omorrow I have an important demo and it seems that I have to take out this = table in my app to show...which will be less impressive in a not so impress= ive app that i have created ....:(

I h= ave made some more screenshots which shows some more error when I tried to = retrieve the table under the table postgres which is already created not it= is not showing the table.

Please help= ,


=
Your second screenshot seems to indicate your connection between PgAdm= in and Pg 11 Server is broken in some ways. If I were taking over the keybo= ard at your workstation and had a critical deadline for tomorrow, here are = some steps I would take:
  • Dump my databases, if I can
  • Backup whatever work I have on a usb stick (create s= ql files, etc)
  • Uninstall Pg Server and Pg Admin
  • Reinstall a= nd see if things start working better
Then on more detailed l= evel, my understanding of Postgres is that when you prefix a word in front = of a table you are referring to a schema so
create table membership.parents...

Will never work unless you first create the schema that parents sit within:=
create schema membership
=

Is it possible your problem is that you aren'= t creating membership schema in your database? (Postgres treats schemas in = much the same way that other database engines treat actual databases).

Finally, if you are desperate for a working = Pg SQL server over the next 24 hours consider spinning up an AWS RDS Pg ins= tance and connecting PgAdmin to that - that way you know the database is re= liable and correctly configured for sure. There might even be a "free tier"= that gives you free service for that time frame..
=

Steve

------=_Part_4152324_430930693.1568285419685--