Re: [SQL] Problem while using lo_import and lo_export

2006-08-02 Thread Aaron Bono
On 8/2/06, Rodrigo De León <[EMAIL PROTECTED]> wrote: On 8/2/06, Aaron Bono <[EMAIL PROTECTED]> wrote:> On 8/2/06, Penchalaiah P. <[EMAIL PROTECTED]> wrote: > > Hi,> >> > I have PostgresSQL database connection from server. Server ip is> 172.16.5.179> >> > Now I want use lo_import and  lo_export fun

Re: [SQL] Problem while using lo_import and lo_export

2006-08-02 Thread Rodrigo De León
On 8/2/06, Aaron Bono <[EMAIL PROTECTED]> wrote: On 8/2/06, Penchalaiah P. <[EMAIL PROTECTED]> wrote: > Hi, > > > > I have PostgresSQL database connection from server. Server ip is 172.16.5.179 > > > > Now I want use lo_import and lo_export function for storing images into the database. > > > >

Re: [SQL] Joining a result set from four (4) tables

2006-08-02 Thread John Tregea
Hi Aaron, The query builder to generate joins that you mentioned is exactly what I am going to do doing this time. That is one of the reasons I have the generic field names for the primary and foreign key fields. Then I only have to pass the search criteria the table names and which direction

Re: [SQL] i need informarion regarding functions and arrays...

2006-08-02 Thread Aaron Bono
On 8/2/06, Penchalaiah P. <[EMAIL PROTECTED]> wrote: Hi good evening to all……..   Rcid    value 1 yes 2 no 3 yes 4 yes 5 no 6 yes 7 no 8

Re: [SQL] How to cal function in one another

2006-08-02 Thread Aaron Bono
On 8/2/06, Penchalaiah P. <[EMAIL PROTECTED]> wrote:   hai, In mainfun,the query returns more than two rows,if execute query outside. I have to remove limit keyword in mainfun defination...even it returns 1st row values only..But i need the multful rows? so how can i do that...p

Re: [SQL] Problem while using lo_import and lo_export

2006-08-02 Thread Aaron Bono
On 8/2/06, Penchalaiah P. <[EMAIL PROTECTED]> wrote: Hi,   I have PostgresSQL database connection from server. Server ip is 172.16.5.179   Now I want use lo_import and  lo_export function for storing images into the database.   This images is located in my system itself.   When

Re: [SQL] Joining a result set from four (4) tables

2006-08-02 Thread Aaron Bono
On 8/1/06, John Tregea <[EMAIL PROTECTED]> wrote: Because the logic structure of this software is in the front endapplication rather than the database there is a strong need to keep thenaming of fields generic rather than specific, I am not usingpre-defined foreign keys at all. If I was building th

Re: [SQL] alter column type from boolean to char with default

2006-08-02 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: > On Wed, 2006-08-02 at 09:19 -0400, Tom Lane wrote: >> Hmm ... the way I would have expected to work is >> >> alter table posts >> alter column deleted drop default, >> alter column deleted type char(1) >> using (case when deleted then 't' else 'f' end), >>

Re: [SQL] viewing the description of tables from python DB-API

2006-08-02 Thread Scott Marlowe
On Tue, 2006-08-01 at 18:14, Rodrigo De Leon wrote: > On 8/1/06, Daniel Joo <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > > > > > Is there a way to view the list of all tables from python (or any other > > languages for that matter) DB-API? What I'm looking for is a command > > similar to the met

Re: [SQL] alter column type from boolean to char with default

2006-08-02 Thread Rod Taylor
On Wed, 2006-08-02 at 09:19 -0400, Tom Lane wrote: > "Markus Bertheau" <[EMAIL PROTECTED]> writes: > > I basically want to change a boolean column to char. The boolean > > column has a default of true. The char column should have 'f' for > > false and 't' for true. I think that an SQL statement lik

Re: [SQL] alter column type from boolean to char with default doesn't work

2006-08-02 Thread Tom Lane
"Markus Bertheau" <[EMAIL PROTECTED]> writes: > I basically want to change a boolean column to char. The boolean > column has a default of true. The char column should have 'f' for > false and 't' for true. I think that an SQL statement like the > following should work, but it doesn't: Hmm ... the

Re: [SQL] How to use table from one database to another

2006-08-02 Thread Richard Broersma Jr
> I have 2 databases namee PAO and CAS. > PAO contains 3 schemas named Public,pao,sts CAS contains 4 schemas > named Public,cao,sts,reports > Now i am in PAO database..now i want access table 'activity' in > schema 'cas' in CAS database. > How it is posible. > 2nd thing is... > i have 2 se

[SQL] i need informarion regarding functions and arrays...

2006-08-02 Thread Penchalaiah P.
Hi good evening to all……..   Rcid    value 1 yes 2 no 3 yes 4 yes 5 no 6 yes 7 no 8 yes 9 no 10

[SQL] alter column type from boolean to char with default doesn't work

2006-08-02 Thread Markus Bertheau
Hi, I basically want to change a boolean column to char. The boolean column has a default of true. The char column should have 'f' for false and 't' for true. I think that an SQL statement like the following should work, but it doesn't: blog=> select version();

[SQL] How to cal function in one another

2006-08-02 Thread Penchalaiah P.
  hai, In mainfun,the query returns more than two rows,if execute query outside. I have to remove limit keyword in mainfun defination...even it returns 1st row values only..But i need the multful rows? so how can i do that...please help me...   select subfun1(22);    subfun1 ---

[SQL] How to use table from one database to another

2006-08-02 Thread Penchalaiah P.
Hai all,  I have 2 databases namee PAO and CAS.  PAO contains 3 schemas named Public,pao,sts CAS contains 4 schemas  named Public,cao,sts,reports    Now  i am in PAO database..now i want access table 'activity' in  schema 'cas' in CAS database.  How it is posible.    2nd thing is

[SQL] Problem while using lo_import and lo_export

2006-08-02 Thread Penchalaiah P.
Hi,   I have PostgresSQL database connection from server. Server ip is 172.16.5.179   Now I want use lo_import and  lo_export function for storing images into the database.   This images is located in my system itself.   When I am going using the following query…   Insert into ima