Thread: LIMIT and him usage

LIMIT and him usage

From
"Ladislav Linhart"
Date:
Hi,
I have a question. How is using LIMIT in SELECT on the application layer.
Create temprorary table before applyes LIMIT ? Exists any way for don't create temporary table with all records ?
thank you for your answers
 
LADiS

Re: LIMIT and him usage

From
Michael Fuhr
Date:
On Mon, Mar 07, 2005 at 11:31:06AM +0100, Ladislav Linhart wrote:

> I have a question. How is using LIMIT in SELECT on the application layer.
> Create temprorary table before applyes LIMIT ? Exists any way for don't
> create temporary table with all records ?

Could you describe what you're trying to do?  What problem are you
trying to solve?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Restoring db objects , help needed

From
Hugo Takada
Date:
hello,

Is it possible to restore a DB Schema in a different schema but in the
same Database? or restore the schema with a different name? or restore
a set of objects into a different schema from where they were
backed-up?

thanks in advance

Hugo

Re: Restoring db objects , help needed

From
Lonni J Friedman
Date:
On Mon, 7 Mar 2005 13:42:48 -0400, Hugo Takada <htakada@gmail.com> wrote:
> hello,
>
> Is it possible to restore a DB Schema in a different schema but in the
> same Database? or restore the schema with a different name? or restore
> a set of objects into a different schema from where they were
> backed-up?

You can definitely restore a dump into a database with a different
name.  Just specify the DB name in your pg_restore command.  The same
should be the case for individual data objects and the schema itself.
Just use the -d option.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama@gmail.com
LlamaLand                       http://netllama.linux-sxs.org

Re: Restoring db objects , help needed

From
Hugo
Date:
Hi ,
 thanks for the advice, I checked the pg_restore command and I can
restore individual objects to different databases, but what I'm trying
to do is to restore a schema X renamed to schema B in the same
database,  when I restore the db object it always restores it to the
original schema, is it possible to restore the object to a different
schema in the same database?

thanks

Hugo


On Mon, 7 Mar 2005 09:54:04 -0800, Lonni J Friedman <netllama@gmail.com> wrote:
> On Mon, 7 Mar 2005 13:42:48 -0400, Hugo Takada <htakada@gmail.com> wrote:
> > hello,
> >
> > Is it possible to restore a DB Schema in a different schema but in the
> > same Database? or restore the schema with a different name? or restore
> > a set of objects into a different schema from where they were
> > backed-up?
>
> You can definitely restore a dump into a database with a different
> name.  Just specify the DB name in your pg_restore command.  The same
> should be the case for individual data objects and the schema itself.
> Just use the -d option.
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> L. Friedman                                    netllama@gmail.com
> LlamaLand                       http://netllama.linux-sxs.org
>

Re: Restoring db objects , help needed

From
Lonni J Friedman
Date:
I've honestly never tried doing that.  The only method that I can
think of is to manually rename the schema inside your dump before
importing/restoring.

Mind if i ask why you want/need to do this?


On Tue, 8 Mar 2005 07:51:53 -0400, Hugo <htakada@gmail.com> wrote:
> Hi ,
>  thanks for the advice, I checked the pg_restore command and I can
> restore individual objects to different databases, but what I'm trying
> to do is to restore a schema X renamed to schema B in the same
> database,  when I restore the db object it always restores it to the
> original schema, is it possible to restore the object to a different
> schema in the same database?
>
> thanks
>
> Hugo
>
> On Mon, 7 Mar 2005 09:54:04 -0800, Lonni J Friedman <netllama@gmail.com> wrote:
> > On Mon, 7 Mar 2005 13:42:48 -0400, Hugo Takada <htakada@gmail.com> wrote:
> > > hello,
> > >
> > > Is it possible to restore a DB Schema in a different schema but in the
> > > same Database? or restore the schema with a different name? or restore
> > > a set of objects into a different schema from where they were
> > > backed-up?
> >
> > You can definitely restore a dump into a database with a different
> > name.  Just specify the DB name in your pg_restore command.  The same
> > should be the case for individual data objects and the schema itself.
> > Just use the -d option.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama@gmail.com
LlamaLand                       http://netllama.linux-sxs.org

Re: LIMIT and his implementation

From
Ladislav Linhart
Date:
Hello,
I don't have a problem. I would like know,  how is it implemented on low-level
(base) layer.

I'm sorry for my english.

Thank you for your answers

LADiS

> On Mon, Mar 07, 2005 at 11:31:06AM +0100, Ladislav Linhart wrote:
> > Create temprorary table before applyes LIMIT ? Exists any way for don't
> > create temporary table with all records ?
>
> Could you describe what you're trying to do?  What problem are you
> trying to solve?

Attachment

Re: LIMIT and him usage

From
Ladis
Date:
Hello,
I don't have a problem. I would like know,  how is it implemented on low-level
(base) layer.

I'm sorry for my english.

Thank you for your answers

LADiS
> On Mon, Mar 07, 2005 at 11:31:06AM +0100, Ladislav Linhart wrote:
> > Create temprorary table before applyes LIMIT ? Exists any way for don't
> > create temporary table with all records ?
>
> Could you describe what you're trying to do?  What problem are you
> trying to solve?

Attachment