Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot

Links

XODOX
Impressum

#1: turn off auto index for foreign key

Posted on 2008-06-10 04:48:08 by Tommy Cheng

------=_Part_1176_17570322.1213066088653
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi admins,
I would like to turn off the auto index for child table's foreign key. It
is because i want to read the information_schema for table, column, index,
unique and so on after creating the database. How to turn off the auto
behavior? Or Is there a way to distinguish between auto one and user created
index?
Thanks
Tommy Cheng

------=_Part_1176_17570322.1213066088653
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi admins,<br>&nbsp; I would like to turn off the auto index for child table&#39;s foreign key. It is because i want to read the information_schema for table, column, index, unique and so on after creating the database. How to turn off the auto behavior? Or Is there a way to distinguish between auto one and user created index?<br>
&nbsp; Thanks<br>Tommy Cheng <br>

------=_Part_1176_17570322.1213066088653--

Report this message

#2: Re: turn off auto index for foreign key

Posted on 2008-06-10 05:50:03 by Scott Marlowe

On Mon, Jun 9, 2008 at 8:48 PM, Tommy Cheng <csckcac@gmail.com> wrote:
> Hi admins,
> I would like to turn off the auto index for child table's foreign key. It
> is because i want to read the information_schema for table, column, index,
> unique and so on after creating the database. How to turn off the auto
> behavior? Or Is there a way to distinguish between auto one and user created
> index?

There is no auto index creation for child relationships, only for the
parent (unique index for primary key etc)

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Report this message

#3: Re: turn off auto index for foreign key

Posted on 2008-06-10 06:17:24 by Tommy Cheng

------=_Part_1343_31016898.1213071444671
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

you are right. I double checked. So, is there any way to turn off auto index
creation for the parent? (the best is changing postgresql database setting)
I am using postgres (PostgreSQL) 8.1.9 on CentOS 5 x86_64

On Tue, Jun 10, 2008 at 11:50 AM, Scott Marlowe <scott.marlowe@gmail.com>
wrote:

> On Mon, Jun 9, 2008 at 8:48 PM, Tommy Cheng <csckcac@gmail.com> wrote:
> > Hi admins,
> > I would like to turn off the auto index for child table's foreign key.
> It
> > is because i want to read the information_schema for table, column,
> index,
> > unique and so on after creating the database. How to turn off the auto
> > behavior? Or Is there a way to distinguish between auto one and user
> created
> > index?
>
> There is no auto index creation for child relationships, only for the
> parent (unique index for primary key etc)
>

------=_Part_1343_31016898.1213071444671
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

you are right. I double checked. So, is there any way to turn off auto index creation for the parent? (the best is changing postgresql database setting)<br>I am using postgres (PostgreSQL) 8.1.9 on CentOS 5 x86_64<br><br><div class="gmail_quote">
On Tue, Jun 10, 2008 at 11:50 AM, Scott Marlowe &lt;<a href="mailto:scott.marlowe@gmail.com">scott.marlowe@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Mon, Jun 9, 2008 at 8:48 PM, Tommy Cheng &lt;<a href="mailto:csckcac@gmail.com">csckcac@gmail.com</a>&gt; wrote:<br>
&gt; Hi admins,<br>
&gt; &nbsp; I would like to turn off the auto index for child table&#39;s foreign key. It<br>
&gt; is because i want to read the information_schema for table, column, index,<br>
&gt; unique and so on after creating the database. How to turn off the auto<br>
&gt; behavior? Or Is there a way to distinguish between auto one and user created<br>
&gt; index?<br>
<br>
</div></div>There is no auto index creation for child relationships, only for the<br>
parent (unique index for primary key etc)<br>
</blockquote></div><br>

------=_Part_1343_31016898.1213071444671--

Report this message

#4: Re: turn off auto index for foreign key

Posted on 2008-06-10 06:58:15 by Alex Hunsaker

On Mon, Jun 9, 2008 at 10:17 PM, Tommy Cheng <csckcac@gmail.com> wrote:
> you are right. I double checked. So, is there any way to turn off auto index
> creation for the parent? (the best is changing postgresql database setting)
> I am using postgres (PostgreSQL) 8.1.9 on CentOS 5 x86_64
>

Again, there is no auto index creation for foriegn keys. However if
you declared the column unique or its the pkey (ala unique) (As Scott
said) then there will an index.

No you cant turn it off because its how postgres enforces uniqueness
see http://www.postgresql.org/docs/8.1/interactive/index-unique- checks.html
for more

My guess, use the name of the index to try to distinguish. Auto
generated ones will always be in the form:
pkey: <table_name>_pkey(num)
unique: <table_name>_<column_name>_key(num)

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Report this message

#5: Re: turn off auto index for foreign key

Posted on 2008-06-10 07:16:55 by Tommy Cheng

------=_Part_1460_32987678.1213075015366
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

um...Your soln is possible. But if the user created an unique index using
constraint name <table_name>_<column_name>_key5, it will not be able to
distinguish it from other auto index.

On Tue, Jun 10, 2008 at 12:58 PM, Alex Hunsaker <badalex@gmail.com> wrote:

> On Mon, Jun 9, 2008 at 10:17 PM, Tommy Cheng <csckcac@gmail.com> wrote:
> > you are right. I double checked. So, is there any way to turn off auto
> index
> > creation for the parent? (the best is changing postgresql database
> setting)
> > I am using postgres (PostgreSQL) 8.1.9 on CentOS 5 x86_64
> >
>
> Again, there is no auto index creation for foriegn keys. However if
> you declared the column unique or its the pkey (ala unique) (As Scott
> said) then there will an index.
>
> No you cant turn it off because its how postgres enforces uniqueness
> see
> http://www.postgresql.org/docs/8.1/interactive/index-unique- checks.html
> for more
>
> My guess, use the name of the index to try to distinguish. Auto
> generated ones will always be in the form:
> pkey: <table_name>_pkey(num)
> unique: <table_name>_<column_name>_key(num)
>

------=_Part_1460_32987678.1213075015366
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

um...Your soln is possible. But if the user created an unique index using constraint name &lt;table_name&gt;_&lt;column_name&gt;_key5, it will not be able to distinguish it from other auto index.<br><br><div class="gmail_quote">
On Tue, Jun 10, 2008 at 12:58 PM, Alex Hunsaker &lt;<a href="mailto:badalex@gmail.com">badalex@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Mon, Jun 9, 2008 at 10:17 PM, Tommy Cheng &lt;<a href="mailto:csckcac@gmail.com">csckcac@gmail.com</a>&gt; wrote:<br>
&gt; you are right. I double checked. So, is there any way to turn off auto index<br>
&gt; creation for the parent? (the best is changing postgresql database setting)<br>
&gt; I am using postgres (PostgreSQL) 8.1.9 on CentOS 5 x86_64<br>
&gt;<br>
<br>
</div>Again, there is no auto index creation for foriegn keys. &nbsp;However if<br>
you declared the column unique or its the pkey (ala unique) (As Scott<br>
said) then there will &nbsp;an index.<br>
<br>
No you cant turn it off because its how postgres enforces uniqueness<br>
see <a href="http://www.postgresql.org/docs/8.1/interactive/index-unique-checks.html" target="_blank"> http://www.postgresql.org/docs/8.1/interactive/index-unique- checks.html</a><br>
for more<br>
<br>
My guess, use the name of the index to try to distinguish. &nbsp;Auto<br>
generated ones will always be in the form:<br>
pkey: &lt;table_name&gt;_pkey(num)<br>
unique: &lt;table_name&gt;_&lt;column_name&gt;_key(num)<br>
</blockquote></div><br>

------=_Part_1460_32987678.1213075015366--

Report this message