Thread: [FEATURE] OIDs check box to enable OIDs

[FEATURE] OIDs check box to enable OIDs

From
Thom Brown
Date:
Hi, me again.

I noticed that on the table properties dialogue window, the checkbox
for "Has OIDs" is disabled if there aren't any OIDs already for the
table rows.  I believe the check used for enabling this isn taking
into account that PostgreSQL versions 8.4 and above can re-enable
OIDs.

Patch attached to implement this.

While I was poking around in the section in question, I noticed that
some of the ALTER TABLE statements don't place a newline before the
SET keyword, and some do.

For example:

Those without newlines:
ALTER TABLE tablename DROP CONSTRAINT
ALTER TABLE tablename SET WITHOUT OIDS;
ALTER TABLE tablename SET TABLESPACE...

Those with newlines:
ALTER TABLE tablename
  SET (FILLFACTOR=...)
ALTER TABLE tablename
  RESET(...)

I personally prefer the ones with newlines, especially since I've been
experimenting with tables having very long names, and some of the
above statements require lots of horizontal scrolling on the SQL tab
to see what the action will be.  Could we harmonise these?  Note that
I didn't change the format for OIDs when I added the WITH OIDS
variant.

Thanks
--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

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

Attachment

Re: [FEATURE] OIDs check box to enable OIDs

From
Guillaume Lelarge
Date:
Hi,

On Sat, 2011-07-02 at 16:18 +0100, Thom Brown wrote:
[...]
>
> I noticed that on the table properties dialogue window, the checkbox
> for "Has OIDs" is disabled if there aren't any OIDs already for the
> table rows.  I believe the check used for enabling this isn taking
> into account that PostgreSQL versions 8.4 and above can re-enable
> OIDs.
>
> Patch attached to implement this.
>

Great patch. It even helped me find a bug. Anyway, commited and pushed.
Thank you.

> While I was poking around in the section in question, I noticed that
> some of the ALTER TABLE statements don't place a newline before the
> SET keyword, and some do.
>
> For example:
>
> Those without newlines:
> ALTER TABLE tablename DROP CONSTRAINT
> ALTER TABLE tablename SET WITHOUT OIDS;
> ALTER TABLE tablename SET TABLESPACE...
>
> Those with newlines:
> ALTER TABLE tablename
>   SET (FILLFACTOR=...)
> ALTER TABLE tablename
>   RESET(...)
>
> I personally prefer the ones with newlines, especially since I've been
> experimenting with tables having very long names, and some of the
> above statements require lots of horizontal scrolling on the SQL tab
> to see what the action will be.  Could we harmonise these?

Yes, we should. Could you provide a patch?

>   Note that
> I didn't change the format for OIDs when I added the WITH OIDS
> variant.
>

No problem.


--
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


Re: [FEATURE] OIDs check box to enable OIDs

From
Thom Brown
Date:
On 2 July 2011 20:20, Guillaume Lelarge <guillaume@lelarge.info> wrote:
> Great patch. It even helped me find a bug. Anyway, commited and pushed.
> Thank you.

Thanks for committing it. :)

>> I personally prefer the ones with newlines, especially since I've been
>> experimenting with tables having very long names, and some of the
>> above statements require lots of horizontal scrolling on the SQL tab
>> to see what the action will be.  Could we harmonise these?
>
> Yes, we should. Could you provide a patch?

Sure, I'll take a look at it.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

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

Re: [FEATURE] OIDs check box to enable OIDs

From
Thom Brown
Date:
On 2 July 2011 21:26, Thom Brown <thom@linux.com> wrote:
> On 2 July 2011 20:20, Guillaume Lelarge <guillaume@lelarge.info> wrote:
>> Great patch. It even helped me find a bug. Anyway, commited and pushed.
>> Thank you.
>
> Thanks for committing it. :)
>
>>> I personally prefer the ones with newlines, especially since I've been
>>> experimenting with tables having very long names, and some of the
>>> above statements require lots of horizontal scrolling on the SQL tab
>>> to see what the action will be.  Could we harmonise these?
>>
>> Yes, we should. Could you provide a patch?
>
> Sure, I'll take a look at it.

Okay, patch attached to wrap lines at various places.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

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

Attachment

Re: [FEATURE] OIDs check box to enable OIDs

From
Guillaume Lelarge
Date:
On Sun, 2011-07-03 at 12:34 +0100, Thom Brown wrote:
> On 2 July 2011 21:26, Thom Brown <thom@linux.com> wrote:
> > On 2 July 2011 20:20, Guillaume Lelarge <guillaume@lelarge.info> wrote:
> >> Great patch. It even helped me find a bug. Anyway, commited and pushed.
> >> Thank you.
> >
> > Thanks for committing it. :)
> >
> >>> I personally prefer the ones with newlines, especially since I've been
> >>> experimenting with tables having very long names, and some of the
> >>> above statements require lots of horizontal scrolling on the SQL tab
> >>> to see what the action will be.  Could we harmonise these?
> >>
> >> Yes, we should. Could you provide a patch?
> >
> > Sure, I'll take a look at it.
>
> Okay, patch attached to wrap lines at various places.
>

Commited, and pushed. Thank you.


--
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com