Thread: TABLE PARTITION

TABLE PARTITION

From
NEVIN ALEX
Date:
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Calibri">Hi,</font></font><p
class="MsoNormal"style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Calibri">      I am Nevin Alex and I am using
postgresqldatabase for a year . But I have’nt used table partitions: Please help me to do it in a better way. I got it
fromthe documentation that it is an inheritance capability and the Trigger working but for dynamic data how can I
implementthat.</font></font><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="Calibri" size="3"> </font><p
class="MsoNormal"style="MARGIN: 0in 0in 0pt"><font size="3"><font face="Calibri">Thanks in advance</font></font> 

Re: TABLE PARTITION

From
Vibhor Kumar
Date:
On Feb 1, 2011, at 10:31 PM, NEVIN ALEX wrote:

> Hi,
>       I am Nevin Alex and I am using postgresql database for a year . But I have’nt used table partitions: Please
helpme to do it in a better way. I got it from the documentation that it is an inheritance capability and the Trigger
workingbut for dynamic data how can I implement that. 
>

Please elaborate more about the data which you are talking about.


> Thanks in advance



why SELECT query needs relationname (schemaName.tableName)

From
"Amar Dhole"
Date:
<div class="Section1"><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Hi All,</span></font><p class="MsoNormal"><font color="navy" face="Arial"
size="2"><spanstyle="font-size: 
10.0pt;font-family:Arial;color:navy"> </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">I have a query regarding database.</span></font><p class="MsoNormal"><font
color="navy"face="Arial" size="2"><span style="font-size: 
10.0pt;font-family:Arial;color:navy"> </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">I have database ‘customer’ which is having schema ‘cust.’</span></font><p
class="MsoNormal"><fontcolor="navy" face="Arial" size="2"><span style="font-size: 
10.0pt;font-family:Arial;color:navy"> </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">I have added my tables and data into ‘cust’. But when I try to run the sql queries
againstthis schema I need to add ‘cust’ as a relationName for every query. But same is  not applicable for public
schema.</span></font><pclass="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 
10.0pt;font-family:Arial;color:navy"> </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">Same is applicable when I query with jdbc.</span></font><p class="MsoNormal"><font
color="navy"face="Arial" size="2"><span style="font-size: 
10.0pt;font-family:Arial;color:navy"> </span></font><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size:
10.0pt;font-family:Arial;color:navy">Can any one guide me how can I make my ‘cust’ schema to work like public schema
meansfor all the sqls I don’t need to append schema name as relationanme.</span></font><p class="MsoNormal"><font
color="navy"face="Arial" size="2"><span style="font-size: 
10.0pt;font-family:Arial;color:navy"><br /> Thanks</span></font><p class="MsoNormal"><font color="navy" face="Arial"
size="2"><spanstyle="font-size: 
10.0pt;font-family:Arial;color:navy">Amar</span></font></div>

Re: why SELECT query needs relationname (schemaName.tableName)

From
Samuel Gendler
Date:
You need to modify the search_path for that user. Read the first section of this page very carefully: http://www.postgresql.org/docs/8.4/static/runtime-config-client.html

The schema that is used for new objects that don't have an explicit schema is always the first schema in the search_path.

You can permanently alter the search_path for the user like this:

alter user <username> set search_path to cust, other_schema, public, pg_catalog;

There's more info on search_path here: http://www.postgresql.org/docs/8.4/static/ddl-schemas.html

On Mon, Feb 7, 2011 at 10:56 PM, Amar Dhole <adhole@tibco.com> wrote:

Hi All,

 

I have a query regarding database.

 

I have database ‘customer’ which is having schema ‘cust.’

 

I have added my tables and data into ‘cust’. But when I try to run the sql queries against this schema I need to add ‘cust’ as a relationName for every query. But same is  not applicable for public schema.

 

Same is applicable when I query with jdbc.

 

Can any one guide me how can I make my ‘cust’ schema to work like public schema means for all the sqls I don’t need to append schema name as relationanme.


Thanks

Amar