Re: Patch: Auto-generate search_path statement for selected schema in query editor
От | Dave Page |
---|---|
Тема | Re: Patch: Auto-generate search_path statement for selected schema in query editor |
Дата | |
Msg-id | CA+OCxoxacfky7Qdb2fRRv8HMpz6rG-gvT6c4XNwkJ09J2LGPBg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Patch: Auto-generate search_path statement for selected schema in query editor (Florian Klaar <flo.klaar@gmx.de>) |
Ответы |
Re: Patch: Auto-generate search_path statement
for selected schema in query editor
|
Список | pgadmin-hackers |
On Mon, Feb 11, 2013 at 8:22 PM, Florian Klaar <flo.klaar@gmx.de> wrote:
Hey,Now i've tested it again and of course you were right, just my testing
> You're missing something - specifically that GetSchema is declared as
> a virtual function. That's done so you can do exactly what I'm proposing.
was flawed. Probably I tested by selecting a schema and opening the
query window, not taking into account that your example code only works
below the schema level of course.
So I've boiled it down to this now:
wxString schemaName;
if(obj->GetTypeName() == wxT("Schema"))
if (obj->GetMetaType() == PGM_SCHEMA)
...
...
schemaName = obj->GetName();
else if (obj->GetSchema())
schemaName = obj->GetSchema()->GetName();
if(!schemaName.IsEmpty())
{
// the works...
}
Much better. Thanks for your input.
Florian
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
В списке pgadmin-hackers по дате отправления: