Skip site navigation (1) Skip section navigation (2)

Re: little patch for "Detect serial columns from pg_depend" and bugfix

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Quan Zongliang <quanzongliang(at)gmail(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: little patch for "Detect serial columns from pg_depend" and bugfix
Date: 2012-09-04 11:02:06
Message-ID: CA+OCxoyTzEN7XU7YdNSqHUQy-9p3R_r47St9dS9UWr2FRuPu1w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
Hi

On Tue, Sep 4, 2012 at 5:03 AM, Quan Zongliang <quanzongliang(at)gmail(dot)com> wrote:
> Hi,
>
> Please find the attachments.
>
> pgColumn.patch:
>
> Detect serial columns from pg_depend, not column default (observe deviating
>   serial name)

This patch does not apply:

raptor:pgAdmin3 dpage$ git apply ~/Downloads/pgColumn.patch
/Users/dpage/Downloads/pgColumn.patch:13: trailing whitespace.
		pgSet *set = ExecuteSet(
/Users/dpage/Downloads/pgColumn.patch:14: trailing whitespace.
						    wxT("SELECT classid\n")
/Users/dpage/Downloads/pgColumn.patch:15: trailing whitespace.
						    wxT("  FROM pg_depend\n")
/Users/dpage/Downloads/pgColumn.patch:16: trailing whitespace.
						    wxT(" WHERE refobjid=") + table->GetOidStr() +
/Users/dpage/Downloads/pgColumn.patch:17: trailing whitespace.
							wxT(" AND refobjsubid = ") + NumToStr(GetColNumber()) +
error: patch failed: pgadmin/schema/pgColumn.cpp:338
error: pgadmin/schema/pgColumn.cpp: patch does not apply

> pgSequence.patch:
>
> bugfix, in SQL pane of the sequence, the script is
>
> CREATE SEQUENCE xxx
>   ...;
> ALTER TABLE ...

That syntax is intentional - it's required with 8.3 and earlier, which
don't support ALTER SEQUENCE ... OWNER. I suppose we could make it
version dependent, but we don't normally both with multiple versions
of the same command unless required.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


In response to

Responses

pgadmin-hackers by date

Next:From: Dave PageDate: 2012-09-04 11:05:23
Subject: Re: pgAgent Database Name Limitation
Previous:From: Martin FrenchDate: 2012-09-04 11:00:38
Subject: Re: pgAgent Database Name Limitation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group