Knowing how many records I just inserted

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Knowing how many records I just inserted
Date: 2003-08-05 20:11:08
Message-ID: 1060114267.5258.30.camel@haggis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi.

v7.3.3

INSERT INTO T_LANE_TX
SELECT LANE_TX_ID,
TX_EXTERN_REF_NO,
[snip]
UPDATE_TS,
substring(ACK_DATE from 1 for 8)::date,
FILENAME_ID
FROM T_LANE_TX2
;
INSERT 0 1241897

Ok, I can see that 1,241,897 rows were inserted into T_LANE_TX.
How can I get that back out to bash, if I'm doing psql scripting?
An env. variable wouldn't work, since it would go away when psql
terminates.

TIA
--
+-----------------------------------------------------------------+
| Ron Johnson, Jr. Home: ron(dot)l(dot)johnson(at)cox(dot)net |
| Jefferson, LA USA |
| |
| "I'm not a vegetarian because I love animals, I'm a vegetarian |
| because I hate vegetables!" |
| unknown |
+-----------------------------------------------------------------+

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Welty 2003-08-05 20:55:48 Re: indices and cidr/inet type
Previous Message Williams, Travis L, NPONS 2003-08-05 20:09:34 Re: multiple insert into's (may be NEWBIE question)