Re: [SQL] Synonyms

2000-10-30 Thread hubert depesz lubaczewski
On Mon, Oct 30, 2000 at 01:17:24PM +, Carl Shelbourne wrote: > * Is there a way of creating synonyms of tables within one database in another > database in Postgres similar to the Informix CREATE SYNONYM? > * If not and related to the post on 2000-10-28 by Sivagami, is there a way, > within a

Re: [SQL] fetching rows

2000-10-30 Thread Martin Christensen
> "Jeff" == Jeff Hoffmann <[EMAIL PROTECTED]> writes: Jeff> you can't do that with a cursor, but you can use they mysql-ism Jeff> called a limit clause. for example, to fetch rows 26-50 from Jeff> that query, you'd do: Jeff> select * from films limit 25,26; Jeff> or Jeff> select * from files

Re: [SQL] fetching rows

2000-10-30 Thread Jeff Hoffmann
Nikolay Mijaylov wrote: > > Let say we have a select that returns 100 rows. > > I can fetch first 25 with simple sql: > > BEGIN WORK; > DECLARE liahona CURSOR FOR SELECT * FROM films; > FETCH [FORWARD] 25 IN liahona; > CLOSE liahona; > COMMIT WORK; > > but how I can fetch rows from 26 to 50? I

Re: [SQL] fetching rows

2000-10-30 Thread K Parker
I hate to be the bearer of bad news, but if you're using PHP and you wanted to fetch just 25 rows at a time for a single page, and then fetch more when the user clicks on a NEXT button or link, you're completely out of luck. Each http transaction is completely separate and so you can't maintai

[SQL] fetching rows

2000-10-30 Thread Nikolay Mijaylov
Let say we have a select that returns 100 rows. I can fetch first 25 with simple sql: BEGIN WORK; DECLARE liahona CURSOR FOR SELECT * FROM films; FETCH [FORWARD] 25 IN liahona; CLOSE liahona; COMMIT WORK; but how I can fetch rows from 26 to 50? I mean withou fetching first 25. Or can I skip fir

Re: [SQL] Synonyms

2000-10-30 Thread Peter Eisentraut
Carl Shelbourne writes: > * Is there a way of creating synonyms of tables within one database in another > database in Postgres similar to the Informix CREATE SYNONYM? Nope. > * If not and related to the post on 2000-10-28 by Sivagami, is there a way, > within a select I can make a query from m

[SQL] unsubscribe

2000-10-30 Thread Schlobohm, Jack
unsubscribe application/ms-tnef

[SQL] Synonyms

2000-10-30 Thread Carl Shelbourne
HELP!!! * Is there a way of creating synonyms of tables within one database in another database in Postgres similar to the Informix CREATE SYNONYM? * If not and related to the post on 2000-10-28 by Sivagami, is there a way, within a select I can make a query from mulitple databases. ( the usua

[SQL] Need help! parse erro

2000-10-30 Thread Najm Hashmi
Hi every one, I have just strated to use postgres. I wrote a vert simple pl/pgsql function as given below: CREATE FUNCTION add_new_user(varchar(32),char(8),varchar(128),varchar(128),varchar(32), varchar(32)) RETURNS boolean AS' DECLARE oldUser RECORD; USR ALIAS FOR $1; PWORD ALIAS FOR $2; EMAIL A

[SQL] unsubscribe

2000-10-30 Thread Vadim Govorov
unsubscribe

Re: [SQL] Large Object dump ?

2000-10-30 Thread Alessandro Rossi
On Mon, 30 Oct 2000, [EMAIL PROTECTED] wrote: >Large objects are not dumped. It should be >in the documentation for large objects. > >You need to write a script which writes them to >disk and then imports them back in after you have >installed your dbs. > > >Troy CREATE TABLE news -- {

Re: [SQL]

2000-10-30 Thread Philip Warner
At 13:36 30/10/00 +0100, Lengyel Ferenc wrote: >Hello everybody! >I need some help with a simple query. >I've got a problem with getting a maximum value from a very large table >(1000+ rows): Unfortunately PGSQL does not use indexes for min & max. One approach that should work is: select

[SQL]

2000-10-30 Thread Petr Jezek
Hi I'll ask for help. I have had used MySQL and the syntax of INSERT have a switch IGNORE if You try to insert a row that in the table already is. I'll ask if exist something like this in postgre SQL syntax.

Re: [SQL] Large Object dump ?

2000-10-30 Thread [EMAIL PROTECTED]
Large objects are not dumped. It should be in the documentation for large objects. You need to write a script which writes them to disk and then imports them back in after you have installed your dbs. Troy > > > I need to move a DB from Pg 6.5 to 7 haw can i export Large Object to the > ne

RE: [SQL]

2000-10-30 Thread Schlobohm, Jack
Can I be removed from this mailing list? > -Original Message- > From: Yury Don [SMTP:[EMAIL PROTECTED]] > Sent: Monday, October 30, 2000 6:55 AM > To: [EMAIL PROTECTED] > Subject: Re: [SQL] > > Hello Lengyel, > > Once, Monday, October 30, 2000, 5:36:23 PM, you wrote: > > LF> Hel

[SQL] Large Object dump ?

2000-10-30 Thread Alessandro Rossi
I need to move a DB from Pg 6.5 to 7 haw can i export Large Object to the new DB ? Pg_dumpall seems non to export LArge Object. Please Help Alex

Re: [SQL]

2000-10-30 Thread Yury Don
Hello Lengyel, Once, Monday, October 30, 2000, 5:36:23 PM, you wrote: LF> Hello everybody! LF> I need some help with a simple query. LF> I've got a problem with getting a maximum value from a very large table LF> (1000+ rows): LF> I have table: LF> CREATE TABLE TABLE_A LF> ( LF> COL1 INT, LF

[SQL]

2000-10-30 Thread Lengyel Ferenc
Hello everybody! I need some help with a simple query. I've got a problem with getting a maximum value from a very large table (1000+ rows): I have table: CREATE TABLE TABLE_A ( COL1 INT, COL2 INT, CONSTRAINT PK PRIMARY KEY (COL1, COL2) ) and when I want to get the maximum value for col1: SEL

[SQL] select with function per row

2000-10-30 Thread Marcin Mazurek
Hi, I have a table with FQDN. I'm trying to take from it the second part which desribed a city. Query isn't too clear but with what is important that whole substr was counted once and applied to every row. Can I (how?) force executor to run this substr on every row of my table? mtldb=# select sub