Re: [SQL] Line length in pl/pgsql function

2004-03-16 Thread Tom Lane
"David Olbersen" <[EMAIL PROTECTED]> writes: > I was minding my business, writing a nice long pl/pgsql function and all was well. I > tried creating the function (using \i ) and started getting > funny errors. > I figured out eventually that the problem seems due to line length in a construct >

Re: [SQL] working with unix timestamp

2004-03-16 Thread Tom Lane
Gary Stainburn <[EMAIL PROTECTED]> writes: > How can I insert the integer timestamp in $timestamp into my table? The "clean" way is select 'epoch'::timestamptz + * '1 second'::interval; for instance regression=# select 'epoch'::timestamptz + 1079459165 * '1 second'::interval; ?column?

Re: [SQL] working with unix timestamp

2004-03-16 Thread Frank Finner
On Tue, 16 Mar 2004 16:54:18 + Gary Stainburn <[EMAIL PROTECTED]> sat down, thought long and then wrote: > Hi folks. > > I've got a last_updated field on my stock records of type timestamp. > > This last_updated field I get using the perl code: > > my $timestamp=(stat "$localcsv/VehicleStoc

[SQL] working with unix timestamp

2004-03-16 Thread Gary Stainburn
Hi folks. I've got a last_updated field on my stock records of type timestamp. This last_updated field I get using the perl code: my $timestamp=(stat "$localcsv/VehicleStock.$data_suffix")[10]; How can I insert the integer timestamp in $timestamp into my table? -- Gary Stainburn This email

Re: [SQL] Can statement_timeout emulated NOWAIT?

2004-03-16 Thread Luis P Caamano
Excellent! Thanks for your prompt replies. -- Luis P Caamano Atlanta, GA, USA ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [SQL] Import from Ms Excel

2004-03-16 Thread Jeff Eckermann
--- Andrew Sullivan <[EMAIL PROTECTED]> wrote: > On Tue, Mar 16, 2004 at 03:13:38PM +0530, Kumar > wrote: > > Dear Friends, > > > > Is possible to import data from MS Excel sheet > into postgres > > database 7.3.4 running on Linux 7.2 > > Yes. I find the easiest way is to export a > delimited fi

Re: [SQL] Can statement_timeout emulated NOWAIT?

2004-03-16 Thread Tom Lane
"Luis P Caamano" <[EMAIL PROTECTED]> writes: > I've researched the recent discussions about statement_timeout > and NOWAIT and I'd like to confirm my understanding of the > situation before acting on it. Please let me know if the > following statements are true: > - LOCK TABLE ... NOWAIT has been

Re: [SQL] Can statement_timeout emulated NOWAIT?

2004-03-16 Thread Bruce Momjian
Yes, I think these are all correct, except I am not positive FOR UPDATE NOWAIT will be in 7.5 unless someone codes it. --- Luis P Caamano wrote: > > I've researched the recent discussions about statement_timeout > and NOWAI

Re: [SQL] conversion of postgres database to oracle

2004-03-16 Thread Andrew Sullivan
On Tue, Mar 16, 2004 at 02:13:57PM +0200, cristi wrote: > How should I convert a postgres database to oracle? Send it out to ASCII and then import it to Oracle. But if you want support for going _to_ Oracle, you probably ought to get support from Oracle people, right? A -- Andrew Sullivan | [

[SQL] Can statement_timeout emulated NOWAIT?

2004-03-16 Thread Luis P Caamano
I've researched the recent discussions about statement_timeout and NOWAIT and I'd like to confirm my understanding of the situation before acting on it. Please let me know if the following statements are true: - LOCK TABLE ... NOWAIT has been checked in and will be available in 7.5 - SELECT .

Re: [SQL] flat file database to postgres

2004-03-16 Thread Frank Finner
On Tue, 16 Mar 2004 12:33:57 - (GMT) [EMAIL PROTECTED] sat down, thought long and then wrote: > > Hi > > Does anybody know how to export data from a flatfile (using perl) database > to postgres? > > Thanks If it is some kind of CSV (text with separators) you could use DBD::CSV for reading

Re: [SQL] could not create shared memory segment: Invalid argument

2004-03-16 Thread Dana Hudes
Well, did you consider getting the value of SHMMAX? Check with ulimit (as the postgres user). On Tue, 16 Mar 2004, beyaNet Consultancy wrote: > Hi, > I have just installed the latest version of OS X panther (10.3.3) and > am now getting the following error message: > > postgres$ /usr/local/pgs

Re: [SQL] could not create shared memory segment: Invalid argument

2004-03-16 Thread Achilleus Mantzios
O kyrios beyaNet Consultancy egrapse stis Mar 16, 2004 : > Hi, > I have just installed the latest version of OS X panther (10.3.3) and > am now getting the following error message: For start do: sysctl -a | grep -i shm or equivalent to find out your current kernel settings. in FreeBSD the way

[SQL] could not create shared memory segment: Invalid argument

2004-03-16 Thread beyaNet Consultancy
Hi, I have just installed the latest version of OS X panther (10.3.3) and am now getting the following error message: postgres$ /usr/local/pgsql/bin/postmaster -i -D /usr/local/pgsql/data FATAL: could not create shared memory segment: Invalid argument DETAIL: Failed system call was shmget(key=5

[SQL] flat file database to postgres

2004-03-16 Thread noor
Hi Does anybody know how to export data from a flatfile (using perl) database to postgres? Thanks ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [SQL] Import from Ms Excel

2004-03-16 Thread Dana Hudes
Certainly you can export your spreadsheet in CSV and it will easily go into Postgresql database (after you create the database and its tables). If you want something more sophisticated, a program in e.g. Perl could use one of the various library programs to extract data in some other-than-straight

[SQL] conversion of postgres database to oracle

2004-03-16 Thread cristi
How should I convert a postgres database to oracle?

Re: [SQL] Import from Ms Excel

2004-03-16 Thread Achilleus Mantzios
O kyrios Andrew Sullivan egrapse stis Mar 16, 2004 : > On Tue, Mar 16, 2004 at 01:42:45PM +0200, Achilleus Mantzios wrote: > > Another fancy lib (although not necessarilly pgsql specific), > > is the POI project from jakarta. > > You can read/write M$ XLS documents from java, and > > subsequently

Re: [SQL] Import from Ms Excel

2004-03-16 Thread Andrew Sullivan
On Tue, Mar 16, 2004 at 01:42:45PM +0200, Achilleus Mantzios wrote: > Another fancy lib (although not necessarilly pgsql specific), > is the POI project from jakarta. > You can read/write M$ XLS documents from java, and > subsequently (via jdbc) manipulate pgsql tables. > > The good part is that

Re: [SQL] Import from Ms Excel

2004-03-16 Thread Achilleus Mantzios
O kyrios Andrew Sullivan egrapse stis Mar 16, 2004 : > On Tue, Mar 16, 2004 at 03:13:38PM +0530, Kumar wrote: > > Dear Friends, > > > > Is possible to import data from MS Excel sheet into postgres > > database 7.3.4 running on Linux 7.2 > > Yes. I find the easiest way is to export a delimited f

Re: [SQL] Import from Ms Excel

2004-03-16 Thread Andrew Sullivan
On Tue, Mar 16, 2004 at 03:13:38PM +0530, Kumar wrote: > Dear Friends, > > Is possible to import data from MS Excel sheet into postgres > database 7.3.4 running on Linux 7.2 Yes. I find the easiest way is to export a delimited file from Excel and use the \copy command in psql. A -- Andrew Sul