From: | Robert Starr <rob(at)surrenderdorothy(dot)com(dot)au> |
---|---|
To: | Laurent Yaish <laurenty(at)gmail(dot)com>, pgadmin-support(at)postgresql(dot)org |
Subject: | Re: restoring a backup and maintaining dependencies? |
Date: | 2007-09-13 06:01:09 |
Message-ID: | 46E8D225.4050400@surrenderdorothy.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you so much, I wondered that. Seemed over simple ;) as I
thought there must be an explicit link rather than a naming convention.<br>
<br>
:) Thanks again.<br>
<div class="moz-signature">
<meta http-equiv="content-type" content="text/html;">
<meta name="generator" content="Adobe GoLive">
<title>Surrender Dorothy</title>
<p align="left">Rob</p>
</div>
<br>
Laurent Yaish wrote:
<blockquote
cite="mid:c7e3acb10709122251q2d99ce6emf01efa0008be4f37(at)mail(dot)gmail(dot)com"
type="cite">
<pre wrap="">There is no difference between running this script and using the
pgadmin gui. pgadmin is just a front end to the database, it generates
the same sql that you would write manually.
If your table is group_items, name your sequence group_items_seq
Laurent
On 9/12/07, Robert Starr <a class="moz-txt-link-rfc2396E" href="mailto:rob(at)surrenderdorothy(dot)com(dot)au"><rob(at)surrenderdorothy(dot)com(dot)au></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi again :)
I have saved out these commands:
CREATE TABLE group_items
(
id serial NOT NULL,
group_id integer,
group_type text,
item_id integer,
visible integer,
CONSTRAINT "group_items_PK" PRIMARY KEY (id)
)
WITHOUT OIDS;
ALTER TABLE group_items OWNER TO postgres;
CREATE SEQUENCE group_items_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE group_items_id_seq OWNER TO postgres;
If I restore them in pgadmin will they become dependent on each other in
the same way as if I created the table in pgadmin? Or will they just
become separate entities without any form of link? If that IS the case,
how can I link them with SQL code, rather than pgadmin?
Advice appreciated lots, I have a lot to learn here :|
rob
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 2.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2007-09-13 06:05:43 | Re: ERROR: duplicate key violates unique constraint "client_alerts_PK" |
Previous Message | Laurent Yaish | 2007-09-13 05:51:37 | Re: restoring a backup and maintaining dependencies? |