Schema related

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Schema related

Ajay Kumar-2
Hi 

I have PG12.3 and am using pgadmin4.21. 
I created my own schema, right click and went to query tool and tried to create some tables.
When I checked, it created all those tables in PUBLIC schema. How can ceate the same in my own schema which I created? Sorry, I don't find any docs online.

Thanks,

Ajay Kumar

Applications Developer

Prince William County Public Schools



Reply | Threaded
Open this post in threaded view
|

Re: Schema related

Murtuza Zabuawala
Hi,

In general, when you want to create or access objects in a schema, you need to write a qualified name consisting of the schema name and object name separated by a dot in the query tool as shown below,

SELECT * FROM your_schema_name.table_name;

-- 
Murtuza

On Sat, 25 Jul 2020, 16:59 Ajay Kumar, <[hidden email]> wrote:
Hi 

I have PG12.3 and am using pgadmin4.21. 
I created my own schema, right click and went to query tool and tried to create some tables.
When I checked, it created all those tables in PUBLIC schema. How can ceate the same in my own schema which I created? Sorry, I don't find any docs online.

Thanks,

Ajay Kumar

Applications Developer

Prince William County Public Schools



Reply | Threaded
Open this post in threaded view
|

Re: Schema related

Ashesh Vashi
In reply to this post by Ajay Kumar-2


On Sat, 25 Jul 2020 at 16:59, Ajay Kumar <[hidden email]> wrote:
Hi 

I have PG12.3 and am using pgadmin4.21. 
I created my own schema, right click and went to query tool and tried to create some tables.
When I checked, it created all those tables in PUBLIC schema. How can ceate the same in my own schema which I created? Sorry, I don't find any docs online.
You can use the search path for the same.

Please refer search_path in this documentation: 

— Ashesh

Thanks,

Ajay Kumar

Applications Developer

Prince William County Public Schools



--

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi

Reply | Threaded
Open this post in threaded view
|

RE: Schema related

Ajay Kumar-2

Ashesh,

 

The document was very helpful and it worked.

Once I use INSERT or COPY command in the ora2pg to generate the sql file, it came as huge file of more than 10gb which makes the pgadmin editor to hang. What is the best practice? Is there a way to insert the data from this generated file without opening the file in the editor?

Looks like we can’t do it on a  schema level.

 

If you point me to a document that will be great.

 

Thanks,

Ajay

 

Ajay Kumar

Applications Developer

Department of Information Technology

Prince William County Public Schools

 

From: Ashesh Vashi <[hidden email]>
Sent: Sunday, July 26, 2020 3:30 AM
To: Ajay Kumar <[hidden email]>
Cc: [hidden email]
Subject: Re: Schema related

 

 

 

On Sat, 25 Jul 2020 at 16:59, Ajay Kumar <[hidden email]> wrote:

Hi 

 

I have PG12.3 and am using pgadmin4.21. 

I created my own schema, right click and went to query tool and tried to create some tables.

When I checked, it created all those tables in PUBLIC schema. How can ceate the same in my own schema which I created? Sorry, I don't find any docs online.

You can use the search path for the same.

 

Please refer search_path in this documentation: 

 

— Ashesh

 

Thanks,

 

Ajay Kumar

Applications Developer

Prince William County Public Schools

 

 

--

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA:
Enterprise PostgreSQL Company

 

http://www.linkedin.com/in/asheshvashi

Reply | Threaded
Open this post in threaded view
|

Re: Schema related

Ashesh Vashi
On Tue, Jul 28, 2020 at 8:32 PM Ajay Kumar <[hidden email]> wrote:

Ashesh,

 

The document was very helpful and it worked.

Once I use INSERT or COPY command in the ora2pg to generate the sql file, it came as huge file of more than 10gb which makes the pgadmin editor to hang. What is the best practice? Is there a way to insert the data from this generated file without opening the file in the editor?

10 GB is definitely a very huge file.
I would suggest you use psql for this operation.

-- Thanks, Ashesh

Looks like we can’t do it on a  schema level.

 

If you point me to a document that will be great.

 

Thanks,

Ajay

 

Ajay Kumar

Applications Developer

Department of Information Technology

Prince William County Public Schools

 

From: Ashesh Vashi <[hidden email]>
Sent: Sunday, July 26, 2020 3:30 AM
To: Ajay Kumar <[hidden email]>
Cc: [hidden email]
Subject: Re: Schema related

 

 

 

On Sat, 25 Jul 2020 at 16:59, Ajay Kumar <[hidden email]> wrote:

Hi 

 

I have PG12.3 and am using pgadmin4.21. 

I created my own schema, right click and went to query tool and tried to create some tables.

When I checked, it created all those tables in PUBLIC schema. How can ceate the same in my own schema which I created? Sorry, I don't find any docs online.

You can use the search path for the same.

 

Please refer search_path in this documentation: 

 

— Ashesh

 

Thanks,

 

Ajay Kumar

Applications Developer

Prince William County Public Schools

 

 

--

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA:
Enterprise PostgreSQL Company

 

http://www.linkedin.com/in/asheshvashi