pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Order by not working
Date: Tue, 16 Feb 2021 16:11:02 -0600
Message-ID: <ff1f0ae0-d505-6772-a18e-92f707419479@gmail.com> (raw)
In-Reply-To: <092195EA-31B0-4EFA-B4EE-1F7F3619817C@yahoo.com>
References: <8D049DD1-DC0D-498B-B7C1-773C4FB82B22.ref@yahoo.com>
	<8D049DD1-DC0D-498B-B7C1-773C4FB82B22@yahoo.com>
	<39D5CE9D-B64F-420F-8260-88B6CD50DED3@datylon.com>
	<2DD24450-CD97-4212-89A9-3640A07B1E0C@yahoo.com>
	<CAKFQuwam37MvQTsCitP-sk6b8XAG-B1+75EnYy2NMkQK2RXf7w@mail.gmail.com>
	<092195EA-31B0-4EFA-B4EE-1F7F3619817C@yahoo.com>

SQL is only intuitive to people who've done programming... :)

Also, since your table names are only composed of lower case and 
underscores, the double quotes are not needed.

On 2/16/21 1:41 PM, Dan Nessett wrote:
> Thanks to those who responded. I have solved my problem by noting the 
> advice to use a select with order by. In particular, I need to export the 
> data to a csv file anyway, so I use the following copy command:
>
> COPY (SELECT household_name, family_list, street_address, city, state, 
> zip, phone_list, email_list
>     FROM "household_data"
>     ORDER BY household_name
>     )
> TO '/tmp/household_data.csv'
> WITH (FORMAT CSV, HEADER);
>
> This works.
>
> Regards,
>
> Dan
>
>> On Feb 16, 2021, at 12:35 PM, David G. Johnston 
>> <david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>> wrote:
>>
>>
>> On Tuesday, February 16, 2021, Dan Nessett <dnessett@yahoo.com 
>> <mailto:dnessett@yahoo.com>> wrote:
>>
>>     Thanks Peter. The listing of the result is from pg-admin 4.30 using
>>     view/edit data applied to the household_data table. In the past this
>>     has always returned the table contents in the ORDR BY sort order. Do
>>     I need to specify some preference in pg_admin to guarantee this?
>>
>>
>> pgAdmin4 might be keying off of the presence of an index, which this 
>> table doesn’t have.
>>
>> David J.
>

-- 
Angular momentum makes the world go 'round.

view thread (10+ messages)  latest in thread

Message-ID: <ff1f0ae0-d505-6772-a18e-92f707419479@gmail.com>
Permalink:  ../ff1f0ae0-d505-6772-a18e-92f707419479@gmail.com/
Also on:    postgresql.org/message-id/ff1f0ae0-d505-6772-a18e-92f707419479@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: Order by not working
  In-Reply-To: <ff1f0ae0-d505-6772-a18e-92f707419479@gmail.com>
  References: <8D049DD1-DC0D-498B-B7C1-773C4FB82B22.ref@yahoo.com> <8D049DD1-DC0D-498B-B7C1-773C4FB82B22@yahoo.com> <39D5CE9D-B64F-420F-8260-88B6CD50DED3@datylon.com> <2DD24450-CD97-4212-89A9-3640A07B1E0C@yahoo.com> <CAKFQuwam37MvQTsCitP-sk6b8XAG-B1+75EnYy2NMkQK2RXf7w@mail.gmail.com> <092195EA-31B0-4EFA-B4EE-1F7F3619817C@yahoo.com> <ff1f0ae0-d505-6772-a18e-92f707419479@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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