Greg Stark <[EMAIL PROTECTED]> writes:
> [On that note, one of my pet peeves is that the default names for constraints
> are of the form $1 which requires quoting, but that \d doesn't quote them so
> that you can almost but not quite copy the \d output into an sql statement
> recreating the const
Greg Stark <[EMAIL PROTECTED]> writes:
> Hmmm I think there's still something missing here. I was using pg_restore -r
> (actually I was using -L but the list was originally generated with -r) which
> seemed like a good idea at the time. Rereading it now it seems like it
> shouldn't change anything
Tom Lane <[EMAIL PROTECTED]> writes:
> AFAICT the difference is not whether you create the FK constraint during
> table creation or add it later (in fact, the same code is executed
> either way). The difference in Greg's example is that he said
> "REFERENCES test" in one case and "REFERENCES tes
> Greg Stark <[EMAIL PROTECTED]> writes:
>> Hmmm I think there's still something missing here. I was using pg_restore -r
>> (actually I was using -L but the list was originally generated with -r) which
>> seemed like a good idea at the time. Rereading it now it seems like it
>> shouldn't change any
It looks like the problem has been introduced by recent changes to dump
more stuff as "constraints". pg_dump is careful to dump indexes before
constraints --- but the latter category now includes not only foreign
key constraints, but unique/primary constraints, and those will all end
up sorted by
Stephan Szabo <[EMAIL PROTECTED]> writes:
> On 28 Aug 2003, Gregory Stark wrote:
>> It seems when you create a new table with the "references" syntax the
>> constraint is created with a dependency specifically on a "primary key"
>> constraint on the target table.
>>
>> However when you alter a tab
On Thu, 28 Aug 2003, Tom Lane wrote:
> Stephan Szabo <[EMAIL PROTECTED]> writes:
> > ... that would only help if the unique constraint were created before the
> > references constraint.
>
> But in any case, pg_dump ought to be careful to dump index creation
> commands before REFERENCES constraints
Stephan Szabo <[EMAIL PROTECTED]> writes:
> ... that would only help if the unique constraint were created before the
> references constraint.
But in any case, pg_dump ought to be careful to dump index creation
commands before REFERENCES constraints, I should think. If it isn't
doing that, there'
On 28 Aug 2003, Gregory Stark wrote:
> It seems when you create a new table with the "references" syntax the
> constraint is created with a dependency specifically on a "primary key"
> constraint on the target table.
>
> However when you alter a table to add a foreign key constraint the constraint
It seems when you create a new table with the "references" syntax the
constraint is created with a dependency specifically on a "primary key"
constraint on the target table.
However when you alter a table to add a foreign key constraint the constraint
is added with a dependency on any unique ind
10 matches
Mail list logo