Re: [SQL] complex column definition in query

2009-06-03 Thread A. Kretschmer
In response to Seb : > > Thanks to all that responded on and off list. Is it necessary to ensure > that the "FROM" part of the two queries are exactly the same (the real No, but both queries should return the same columns (count, typ, order). Andreas -- Andreas Kretschmer Kontakt: Heynitz: 03

Re: [SQL] complex column definition in query

2009-06-03 Thread Seb
On Wed, 3 Jun 2009 07:04:32 +0200, "A. Kretschmer" wrote: > In response to Seb : >> Hi, >> Say we have a table: >> SELECT * FROM weather; city | temp_lo | temp_hi | prcp >> ---+-+-+--- San Francisco | 46 | 50 | >> 0.25 San Francisco | 43 | 57 | 0 Hayward | 37 | 5

Re: [SQL] Creation of file from postgresql function

2009-06-03 Thread A. Kretschmer
In response to Jyoti Seth : > If anyone has idea about this problem or know any other alternative to > create a file from postgres function, please let me know. > > Thanks, > Jyoti On server-side? You need a function written in an untrusted language, for instance pl/perlU or plsh. Regards, And

[SQL] Creation of file from postgresql function

2009-06-03 Thread Jyoti Seth
Hi, I want to create a file on a disk through postgres function. I am trying to use large objects functions (lo_create, lo_open and lo_write) for this. In this, lo_open command is throwing error "invalid mode" or "Syntax error whereas I have given the value of INV_WRITE from libpq-fs.h as mode.

Re: [SQL] complex column definition in query

2009-06-03 Thread A. Kretschmer
In response to Seb : > Hi, > > Say we have a table: > > SELECT * FROM weather; > city | temp_lo | temp_hi | prcp > ---+-+-+--- > San Francisco | 46 | 50 | 0.25 > San Francisco | 43 | 57 |0 > Hayward | 37 | 54