pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedAPPEND INTO?
3+ messages / 3 participants
[nested] [flat]
* APPEND INTO?
@ 2005-12-01 14:23 Mark Fenbers <Mark.Fenbers@noaa.gov>
2005-12-01 15:32 ` Re: APPEND INTO? Jaime Casanova <systemguards@gmail.com>
2005-12-01 15:32 ` Re: APPEND INTO? Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 3+ messages in thread
From: Mark Fenbers @ 2005-12-01 14:23 UTC (permalink / raw)
To: pgsql-sql
I want to SELECT INTO mytable WHERE (criteria are met), except that I
want to APPEND into an existing table the rows that are selected,
instead of creating a new table (which SELECT INTO will do). How can
this be done?
(Is this what the "FOR UPDATE OF tablename" clause is for?)
Mark
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: APPEND INTO?
2005-12-01 14:23 APPEND INTO? Mark Fenbers <Mark.Fenbers@noaa.gov>
@ 2005-12-01 15:32 ` Jaime Casanova <systemguards@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Jaime Casanova @ 2005-12-01 15:32 UTC (permalink / raw)
To: Mark Fenbers <Mark.Fenbers@noaa.gov>; +Cc: pgsql-sql
On 12/1/05, Mark Fenbers <Mark.Fenbers@noaa.gov> wrote:
> I want to SELECT INTO mytable WHERE (criteria are met), except that I
> want to APPEND into an existing table the rows that are selected,
> instead of creating a new table (which SELECT INTO will do). How can
> this be done?
>
> (Is this what the "FOR UPDATE OF tablename" clause is for?)
>
> Mark
>
INSERT INTO table SELECT ....
--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: APPEND INTO?
2005-12-01 14:23 APPEND INTO? Mark Fenbers <Mark.Fenbers@noaa.gov>
@ 2005-12-01 15:32 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2005-12-01 15:32 UTC (permalink / raw)
To: Mark Fenbers <Mark.Fenbers@noaa.gov>; +Cc: pgsql-sql
Mark Fenbers <Mark.Fenbers@noaa.gov> writes:
> I want to SELECT INTO mytable WHERE (criteria are met), except that I
> want to APPEND into an existing table the rows that are selected,
> instead of creating a new table (which SELECT INTO will do). How can
> this be done?
INSERT INTO foo SELECT whatever
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-12-01 15:32 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-01 14:23 APPEND INTO? Mark Fenbers <Mark.Fenbers@noaa.gov>
2005-12-01 15:32 ` Jaime Casanova <systemguards@gmail.com>
2005-12-01 15:32 ` Tom Lane <tgl@sss.pgh.pa.us>
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