Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 895699FB52E for ; Tue, 31 Jul 2007 01:20:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 27053-10 for ; Tue, 31 Jul 2007 01:20:01 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.234]) by postgresql.org (Postfix) with ESMTP id 6EA149FB4C0 for ; Tue, 31 Jul 2007 01:20:01 -0300 (ADT) Received: by qb-out-0506.google.com with SMTP id o12so10615694qba for ; Mon, 30 Jul 2007 21:20:00 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:content-type:date:message-id:mime-version:x-mailer; b=THV+Or9swsi22WNPKCIFWr67/3a1f6mQuQWMab7RbTQWS4ihfyxBw2q5Hj41PoB4b99/X+Va/XJzFuWLzZltjyYLGrrbWS8RykyotaXysTvr3DeWoNfPWlrlHdVmxyeQ9ucjS7cdfkWUecHnG+/ey/8ttwQ2p2BzzQGDe/9mw5Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:subject:from:to:content-type:date:message-id:mime-version:x-mailer; b=EjNCh7U/Y5Qzw50Y03DrR2yKHKPg42JyInn2I5/8dFmk3ONFtFZ3qq1x0yl0DdALjRSIuKjmMgiKvVG0vWT7IXyVX7pcX6V1StO9gY3n8BOVauSi7TyTm+Lb6C6lwRGMcholg1PjjhqTkOQPHhdWz8WJAQ+tW6ntL06HVIQjoU8= Received: by 10.141.177.2 with SMTP id e2mr2074700rvp.1185855600154; Mon, 30 Jul 2007 21:20:00 -0700 (PDT) Received: from ?133.88.3.33? ( [203.87.136.43]) by mx.google.com with ESMTPS id g31sm6213853rvb.2007.07.30.21.19.56 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Jul 2007 21:19:59 -0700 (PDT) Subject: alter table table add column From: Ronald Rojas To: pgsql-sql@postgresql.org, pgsql-general@postgresql.org, pgsql-novice@postgresql.org, pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary="=-htvM2mI+vhFTy9WJ1d9K" Date: Tue, 31 Jul 2007 12:19:47 +0800 Message-Id: <1185855587.28634.6.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/346 X-Sequence-Number: 26327 --=-htvM2mI+vhFTy9WJ1d9K Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, Anybody knows how to add column with reference to BEFORE or AFTER any given column? Let say here's my table structure: Column | Type | Modifiers ----------+-------------------+----------- surname | character varying | lastname | character varying | address | character varying | And, I want to add the field name age with type integer after lastname OR before the address field. How to I do that? I would really appreciate your response. Thanks in advance. ================================================================================================== Ronald Rojas Systems Administrator Linux Registered User #427229 ================================================================================================== Arnold's Laws of Documentation: (1) If it should exist, it doesn't. (2) If it does exist, it's out of date. (3) Only documentation for useless programs transcends the first two laws. --=-htvM2mI+vhFTy9WJ1d9K Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Hi,

Anybody knows how to add column with reference to BEFORE or AFTER any given column? Let say here's my table structure:

  Column  |       Type        | Modifiers
----------+-------------------+-----------
surname  | character varying |
lastname | character varying |
address   | character varying |

And, I want to add the field name age with type integer after lastname OR before the address field. How to I do that?

I would really appreciate your response.

Thanks in advance.


==================================================================================================
Ronald Rojas
Systems Administrator
Linux Registered  User #427229
==================================================================================================

Arnold's Laws of Documentation:
	(1) If it should exist, it doesn't.
	(2) If it does exist, it's out of date.
	(3) Only documentation for useless programs transcends the
	    first two laws.


--=-htvM2mI+vhFTy9WJ1d9K--