pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem perhaps after upgrading to pgadmin4 7.4
6+ messages / 4 participants
[nested] [flat]

* Problem perhaps after upgrading to pgadmin4 7.4
@ 2023-07-13 11:20  Carl Erik Eriksson <carlerikeriksson@mac.com>
  0 siblings, 3 replies; 6+ messages in thread

From: Carl Erik Eriksson @ 2023-07-13 11:20 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Query tool PGadmin on my mac

If I enter a query like  select count(*) from table_1    I get a correct response from the server
If I enter select * from table_1 I get an error message that I do not understand:
Error Message:missing FROM-clause entry for table "rel"
LINE 8: ...ER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid

PSQL tool (PGadmin on my Mac)

However if I enter the same from the PSQL tool  I get the correct output.

But that output goes to my screen and I have found no way of directing it to a file on my Mac.

Any suggestions?  Either getting rid of the error message and getting the output to my screen within the Query tool where I can then dump the output to a file
OR a way of running my query using the PSQL tool and redirecting the output to a file on my computer.

An amateur who is up a creek without any paddle..

Carl E Eriksson 




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Problem perhaps after upgrading to pgadmin4 7.4
@ 2023-07-13 11:52  hubert depesz lubaczewski <depesz@depesz.com>
  parent: Carl Erik Eriksson <carlerikeriksson@mac.com>
  2 siblings, 2 replies; 6+ messages in thread

From: hubert depesz lubaczewski @ 2023-07-13 11:52 UTC (permalink / raw)
  To: Carl Erik Eriksson <carlerikeriksson@mac.com>; +Cc: pgsql-general@lists.postgresql.org

On Thu, Jul 13, 2023 at 01:20:03PM +0200, Carl Erik Eriksson wrote:
> If I enter a query like  select count(*) from table_1    I get a correct response from the server
> If I enter select * from table_1 I get an error message that I do not understand:
> Error Message:missing FROM-clause entry for table "rel"
> LINE 8: ...ER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid
> PSQL tool (PGadmin on my Mac)
> However if I enter the same from the PSQL tool  I get the correct output.
> 
> But that output goes to my screen and I have found no way of directing it to a file on my Mac.
> 
> Any suggestions?  Either getting rid of the error message and getting the output to my screen within the Query tool where I can then dump the output to a file
> OR a way of running my query using the PSQL tool and redirecting the output to a file on my computer.
> 
> An amateur who is up a creek without any paddle..

Which pg version you're on?

Generally, try updating to newest pgadmin, from git repo
(https://github.com/pgadmin-org/pgadmin4/), there is/was a bug that
caused problems when using pg < 11 :
https://github.com/pgadmin-org/pgadmin4/commit/732bcc2b4d91f0126cf69d69c14df199bc4106bc

Best regards,

depesz






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Problem perhaps after upgrading to pgadmin4 7.4
@ 2023-07-13 11:58  Carl Erik Eriksson <carlerikeriksson@mac.com>
  parent: hubert depesz lubaczewski <depesz@depesz.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Carl Erik Eriksson @ 2023-07-13 11:58 UTC (permalink / raw)
  To: depesz@depesz.com; +Cc: pgsql-general@lists.postgresql.org

Thanks - it seems we might be on pg 10.17-1  /Carl

> On 13 Jul 2023, at 13:52, hubert depesz lubaczewski <depesz@depesz.com> wrote:
> 
> On Thu, Jul 13, 2023 at 01:20:03PM +0200, Carl Erik Eriksson wrote:
>> If I enter a query like  select count(*) from table_1    I get a correct response from the server
>> If I enter select * from table_1 I get an error message that I do not understand:
>> Error Message:missing FROM-clause entry for table "rel"
>> LINE 8: ...ER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid
>> PSQL tool (PGadmin on my Mac)
>> However if I enter the same from the PSQL tool  I get the correct output.
>> 
>> But that output goes to my screen and I have found no way of directing it to a file on my Mac.
>> 
>> Any suggestions?  Either getting rid of the error message and getting the output to my screen within the Query tool where I can then dump the output to a file
>> OR a way of running my query using the PSQL tool and redirecting the output to a file on my computer.
>> 
>> An amateur who is up a creek without any paddle..
> 
> Which pg version you're on?
> 
> Generally, try updating to newest pgadmin, from git repo
> (https://github.com/pgadmin-org/pgadmin4/), there is/was a bug that
> caused problems when using pg < 11 :
> https://github.com/pgadmin-org/pgadmin4/commit/732bcc2b4d91f0126cf69d69c14df199bc4106bc
> 
> Best regards,
> 
> depesz
> 






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Problem perhaps after upgrading to pgadmin4 7.4
@ 2023-07-13 13:48  Carl Erik Eriksson <carlerikeriksson@mac.com>
  parent: hubert depesz lubaczewski <depesz@depesz.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Carl Erik Eriksson @ 2023-07-13 13:48 UTC (permalink / raw)
  To: depesz@depesz.com; +Cc: pgsql-general@lists.postgresql.org

Problem solved - thanks Depez!  (The solution for now is to downgrade to PGadmin4 version 7.2)



> On 13 Jul 2023, at 13:52, hubert depesz lubaczewski <depesz@depesz.com> wrote:
> 
> On Thu, Jul 13, 2023 at 01:20:03PM +0200, Carl Erik Eriksson wrote:
>> If I enter a query like  select count(*) from table_1    I get a correct response from the server
>> If I enter select * from table_1 I get an error message that I do not understand:
>> Error Message:missing FROM-clause entry for table "rel"
>> LINE 8: ...ER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid
>> PSQL tool (PGadmin on my Mac)
>> However if I enter the same from the PSQL tool  I get the correct output.
>> 
>> But that output goes to my screen and I have found no way of directing it to a file on my Mac.
>> 
>> Any suggestions?  Either getting rid of the error message and getting the output to my screen within the Query tool where I can then dump the output to a file
>> OR a way of running my query using the PSQL tool and redirecting the output to a file on my computer.
>> 
>> An amateur who is up a creek without any paddle..
> 
> Which pg version you're on?
> 
> Generally, try updating to newest pgadmin, from git repo
> (https://github.com/pgadmin-org/pgadmin4/), there is/was a bug that
> caused problems when using pg < 11 :
> https://github.com/pgadmin-org/pgadmin4/commit/732bcc2b4d91f0126cf69d69c14df199bc4106bc
> 
> Best regards,
> 
> depesz
> 






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Problem perhaps after upgrading to pgadmin4 7.4
@ 2023-07-13 17:53  Erik Wienhold <ewie@ewie.name>
  parent: Carl Erik Eriksson <carlerikeriksson@mac.com>
  2 siblings, 0 replies; 6+ messages in thread

From: Erik Wienhold @ 2023-07-13 17:53 UTC (permalink / raw)
  To: Carl Erik Eriksson <carlerikeriksson@mac.com>; pgsql-general@lists.postgresql.org

> On 13/07/2023 13:20 CEST Carl Erik Eriksson <carlerikeriksson@mac.com> wrote:
>
> Query tool PGadmin on my mac
>
> If I enter a query like  select count(*) from table_1    I get a correct
> response from the server
> If I enter select * from table_1 I get an error message that I do not
> understand:
> Error Message:missing FROM-clause entry for table "rel"
> LINE 8: ...ER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid
>
> PSQL tool (PGadmin on my Mac)
>
> However if I enter the same from the PSQL tool  I get the correct output.
>
> But that output goes to my screen and I have found no way of directing it to
> a file on my Mac.

Redirect the output in psql with meta command \out:

	\out /path/to/file.txt
	select * from table_1;

> Carl E Eriksson

That's a cool name ;)

--
Erik





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Problem perhaps after upgrading to pgadmin4 7.4
@ 2023-07-17 02:23  Ron <ronljohnsonjr@gmail.com>
  parent: Carl Erik Eriksson <carlerikeriksson@mac.com>
  2 siblings, 0 replies; 6+ messages in thread

From: Ron @ 2023-07-17 02:23 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 7/13/23 06:20, Carl Erik Eriksson wrote:
> Query tool PGadmin on my mac
>
> If I enter a query like  select count(*) from table_1    I get a correct response from the server
> If I enter select * from table_1 I get an error message that I do not understand:
> Error Message:missing FROM-clause entry for table "rel"
> LINE 8: ...ER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid
>
> PSQL tool (PGadmin on my Mac)
>
> However if I enter the same from the PSQL tool  I get the correct output.
>
> But that output goes to my screen and I have found no way of directing it to a file on my Mac.
>
> Any suggestions?  Either getting rid of the error message and getting the output to my screen within the Query tool where I can then dump the output to a file
> OR a way of running my query using the PSQL tool and redirecting the output to a file on my computer.

Two other solutions:
psql --dbname=foo -c "select * from table_1;" > table_1.txt
psql foo --csv -c "select * from table_1;" > table_1.csv

-- 
Born in Arizona, moved to Babylonia.





^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2023-07-17 02:23 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-07-13 11:20 Problem perhaps after upgrading to pgadmin4 7.4 Carl Erik Eriksson <carlerikeriksson@mac.com>
2023-07-13 11:52 ` hubert depesz lubaczewski <depesz@depesz.com>
2023-07-13 11:58   ` Carl Erik Eriksson <carlerikeriksson@mac.com>
2023-07-13 13:48   ` Carl Erik Eriksson <carlerikeriksson@mac.com>
2023-07-13 17:53 ` Erik Wienhold <ewie@ewie.name>
2023-07-17 02:23 ` Ron <ronljohnsonjr@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox