Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #273

Column Order

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Michael Hufschmidt <Michael.Hufschmidt@omnis.net>
Newsgroups comp.databases.postgresql
Subject Column Order
Date Fri, 04 Nov 2011 12:18:28 +0100
Lines 14
Message-ID <9hi005F3v8U1@mid.individual.net> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net WOcDAENC2CQHF0KyTQ7DqQkinX/op9OqKJ8tynyPj9UillV/lC
Cancel-Lock sha1:1RuX7oxqRz8wAUPTZsl0ayKEfnI=
User-Agent Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.23) Gecko/20110920 SUSE/3.1.15 Thunderbird/3.1.15
Xref x330-a1.tempe.blueboxinc.net comp.databases.postgresql:273

Show key headers only | View raw


Hi @ all,

When I do a "SELECT * FROM myTable WHERE ..." using psql I want to have 
the columns displayed in a meaningful order by default. I want to avoid 
a "SELECT firstname, lastname, <many other cols to follow> ...". Is it 
possible to modify the order of columns with an
   ALTER TABLE myTable ALTER COLUMN  lastname <put behind firstname>

Same holds for adding a new column, how can I
   ALTER TABLE myTable ADD COLUMN title VARCHAR(255)  <put before firstname>

This is possible in mySQL, not in PostgreSQL?

Any ideas are welcome - Michael

Back to comp.databases.postgresql | Previous | NextNext in thread | Find similar


Thread

Column Order Michael Hufschmidt <Michael.Hufschmidt@omnis.net> - 2011-11-04 12:18 +0100
  Re: Column Order Robert Klemme <shortcutter@googlemail.com> - 2011-11-04 17:39 +0100
    Re: Column Order Matthew Woodcraft <mattheww@chiark.greenend.org.uk> - 2011-11-04 18:29 +0000
  Re: Column Order Matthew Woodcraft <mattheww@chiark.greenend.org.uk> - 2011-11-04 18:23 +0000

csiph-web