Re: ...ADD CONSTRAINT "$1"... ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: kynn(at)panix(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: ...ADD CONSTRAINT "$1"... ?
Date: 2005-09-10 19:10:21
Message-ID: 19489.1126379421@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

<kynn(at)panix(dot)com> writes:
> In the output I get from pg_dump I see many instances of expressions
> like
> ...ADD CONSTRAINT "$1"...
> What does the "$1" mean?

It's just a constraint name (assigned by an older version of Postgres
apparently --- I don't think current releases generate names like that
anymore).

> I want to add more constraints "by hand" to the dump file. I imagine
> that the constraint would include the fragment
> ...ADD CONSTRAINT "$2"...
> ...or "$3", "$4", whatever, but I want to understand what I'm doing.

Use whatever name you want as long as it's not already used for another
constraint on the same table.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Kretschmer Andreas 2005-09-10 20:32:36 Re: What's the point of creating a schema?
Previous Message Daniel Staal 2005-09-10 18:09:35 Re: What's the point of creating a schema?