Re: couple bugs with schema

Jonathan Ellis <[email protected]> Fri, 13 Jan 2006 08:49:11 -0700
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
On 1/12/06, Jacob Smullyan <[email protected]> wrote:
> On Thu, Jan 12, 2006 at 05:47:35PM -0700, Jonathan Ellis wrote:
> > autoschema(schema='pg_catalog') throws an exception (PG 8.1):

> The same exception is thrown with PG 8.0.1, and probably with earlier
> versions.  According to the postgresql documentation,
> pg_attribute.attnum for system columns like oid have arbitrary
> negative values.  See:
>
>   http://www.postgresql.org/docs/8.1/interactive/catalog-pg-attribute.html
>
> I have to point out that you contributed this code:).

It's been a while. :)

> Now, we could decide not to support those values and simply skip them;
> I attach the obvious patch against svn HEAD that does that.

That's probably the right thing to do.  Cleaner would be to add "AND
a.attnum > 0" to the query itself, though, which is what the other
query on pg_attribute does right now.

-Jonathan


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click