[SQL] linux

2007-07-11 Thread Mohd Ghalib Akhtar
how to download linux 7.3 image file(means os) ?

 
Take care
Mohd.Ghalib Akhtar
(India.M)9899868681
(Africa.M) +255787896861 










- Original Message 
From: Tom Lane <[EMAIL PROTECTED]>
To: Peter Eisentraut <[EMAIL PROTECTED]>
Cc: [email protected]
Sent: Tuesday, July 10, 2007 9:15:20 PM
Subject: Re: [SQL] Database system identifier from SQL


Peter Eisentraut <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Peter Eisentraut <[EMAIL PROTECTED]> writes:
>>> Is there a way to query the database system identifier that
>>> pg_controldata outputs from SQL?
>> 
>> Don't think so.  Do you have a use-case for providing a function to
>> return that?

> I'd like to find out whether two connections are really to the same 
> server.

Hmm.  Seems a bit of an odd case, but on the other hand there might be
applications for it in connection with management of backups and
WAL-shipping and so forth.  I have no objection to adding a function.

regards, tom lane

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


   

Building a website is a piece of cake. Yahoo! Small Business gives you all the 
tools to get online.
http://smallbusiness.yahoo.com/webhosting 

Re: [SQL] linux

2007-07-11 Thread A. Kretschmer
am  Wed, dem 11.07.2007, um  6:04:51 -0700 mailte Mohd Ghalib Akhtar folgendes:
> how to download linux 7.3 image file(means os) ?

Please wait some years, the current stable linux version is 2.6.22.1. I
inform you when Linux 7.3 is available...


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[SQL] using EXECUTE on Selects

2007-07-11 Thread Radhika Sambamurti
Hi,

Here is my need:

I have to select data by building up the where clause:
example: WHERE firm = 'nnn'
 WHERE firm = 'nnn' AND symbol = 'bbb'
 WHERE date BETWEEN 'startdate' AND 'enddate' AND symbol = 'bbb'

And so on.

I was hoping to write a function where I can build up my where clause
(dynamic sql) and use the EXECUTE command with it. But I just read that
the SELECT INTO has not been implemented for use with EXECUTE.

Is there a way to select data using EXECUTE?

Thanks.
Radhika


-- 
It is all a matter of perspective. You choose your view by choosing where
to stand.
Larry Wall
---


---(end of broadcast)---
TIP 6: explain analyze is your friend


[SQL] using EXECUTE on Selects

2007-07-11 Thread Radhika Sambamurti
Hi,

Here is my need:

I have to select data by building up the where clause:
example: WHERE firm = 'nnn'
 WHERE firm = 'nnn' AND symbol = 'bbb'
 WHERE date BETWEEN 'startdate' AND 'enddate' AND symbol = 'bbb'

And so on.

I was hoping to write a function where I can build up my where clause
(dynamic sql) and use the EXECUTE command with it. But I just read that
the SELECT INTO has not been implemented for use with EXECUTE.

Is there a way to select data using EXECUTE?

Thanks.
Radhika



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [SQL] using EXECUTE on Selects

2007-07-11 Thread Rodrigo De León

On 7/11/07, Radhika Sambamurti <[EMAIL PROTECTED]> wrote:

Is there a way to select data using EXECUTE?


FOR-IN-EXECUTE.

See:
http://www.postgresql.org/docs/8.2/static/plpgsql-control-structures.html#PLPGSQL-RECORDS-ITERATING

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

   http://www.postgresql.org/about/donate


Re: [SQL] using EXECUTE on Selects

2007-07-11 Thread Andrew Sullivan
On Wed, Jul 11, 2007 at 12:41:21PM -0400, Radhika Sambamurti wrote:
> I was hoping to write a function where I can build up my where clause
> (dynamic sql) and use the EXECUTE command with it. But I just read that
> the SELECT INTO has not been implemented for use with EXECUTE.
> 
> Is there a way to select data using EXECUTE?

You missed the opening sentence of the previous paragraph:

The INTO clause specifies where the results of a SELECT
command should be assigned.

A

-- 
Andrew Sullivan  | [EMAIL PROTECTED]
The whole tendency of modern prose is away from concreteness.
--George Orwell

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [SQL] using EXECUTE on Selects

2007-07-11 Thread A. Kretschmer
am  Wed, dem 11.07.2007, um 12:41:21 -0400 mailte Radhika Sambamurti folgendes:
> Hi,
> 
> Here is my need:
> 
> I have to select data by building up the where clause:
> example: WHERE firm = 'nnn'
>  WHERE firm = 'nnn' AND symbol = 'bbb'
>  WHERE date BETWEEN 'startdate' AND 'enddate' AND symbol = 'bbb'
> 
> And so on.
> 
> I was hoping to write a function where I can build up my where clause
> (dynamic sql) and use the EXECUTE command with it. But I just read that
> the SELECT INTO has not been implemented for use with EXECUTE.

You can use "execute sql into foo;" with sql your dynamic sql and foo
your variable to store the result.


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [SQL] using EXECUTE on Selects

2007-07-11 Thread Radhika Sambamurti
Thanks! That worked. I really could'nt make sense of the documentation,
the way it was worded. I tested it out and it works.

Thanks again!

Radhika

> am  Wed, dem 11.07.2007, um 12:41:21 -0400 mailte Radhika Sambamurti
> folgendes:
>> Hi,
>>
>> Here is my need:
>>
>> I have to select data by building up the where clause:
>> example: WHERE firm = 'nnn'
>>  WHERE firm = 'nnn' AND symbol = 'bbb'
>>  WHERE date BETWEEN 'startdate' AND 'enddate' AND symbol = 'bbb'
>>
>> And so on.
>>
>> I was hoping to write a function where I can build up my where clause
>> (dynamic sql) and use the EXECUTE command with it. But I just read that
>> the SELECT INTO has not been implemented for use with EXECUTE.
>
> You can use "execute sql into foo;" with sql your dynamic sql and foo
> your variable to store the result.
>
>
> Andreas
> --
> Andreas Kretschmer
> Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
> GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net
>
> ---(end of broadcast)---
> TIP 3: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/docs/faq
>


-- 
It is all a matter of perspective. You choose your view by choosing where
to stand.
Larry Wall
---


---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [SQL] linux

2007-07-11 Thread Andrej Ricnik-Bay

On 7/12/07, Mohd Ghalib Akhtar <[EMAIL PROTECTED]> wrote:

how to download linux 7.3 image file(means os) ?

Please, for the sake of people who use mailing systems
that support threading  start a new mail for a new topic.
Don't just respond to one you spotted and change the subject.

Highly irritating.


Cheers,
Andrej

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


[SQL] Using case or if to return multiple rows

2007-07-11 Thread Ashish Karalkar
Hello all,


I want to select data from two diffrent table based on third tables column
somthing like:


select case when  t3.date='' then
select * from table1

else 
select * from table 2

 from table3  t3 where t3.date='x'


Problem is that I have to do it in Plain SQL.

Is there a anyway.

Thanks in Advance 

With egards
Ashish