[GENERAL] what is the data type for files(.txt,.doc,.jpeg) in pgsql

2006-02-06 Thread rama krishna
1)I need to insert the files in database .So what i have to give the data type for that field while creating the table. And how to insert and select the file from the database. 2)I need to perform some action in database before it shutting down or before booting of my server.What to do for th

Re: [GENERAL] Primary keys for companies and people

2006-02-06 Thread Michael Glaesemann
On Feb 4, 2006, at 2:23 , Merlin Moncure wrote: If you kind determine an easy natural differentiator, invent one: create table contact ( account text, name text, memo text, primary key(account, name, memo) ); The memo field is blank in most cases unlees it's needed. Suppose you were filli

Re: [GENERAL] Trying to auto start Postgres when server boots up

2006-02-06 Thread rama krishna
On 2/6/06, Shahid Butt <[EMAIL PROTECTED]> wrote: > Hi, > > I am using PostgreSQL 7.4.7 and Red Hat Enterprise Linux 4. > > I want to start the Postgres Postmaster automatically when the server > boots up. > I have tried putting the command > "/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l

Re: [GENERAL] Trying to auto start Postgres when server boots up

2006-02-06 Thread Christopher Browne
> I am using PostgreSQL 7.4.7 and Red Hat Enterprise Linux 4. > > I want to start the Postgres Postmaster automatically when the server > boots up. > I have tried putting the command > "/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l > /usr/local/pgsql/data/server.log start" > In the /et

Re: [GENERAL] Trying to auto start Postgres when server boots up

2006-02-06 Thread Jonel Rienton
This might be trivial, but, shouldn't you su to the user(postgres or whatever you used) that's supposed to run the postmaster? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shahid Butt Sent: Monday, February 06, 2006 9:34 AM To: pgsql-general@postgresql

[GENERAL] Trying to auto start Postgres when server boots up

2006-02-06 Thread Shahid Butt
Hi, I am using PostgreSQL 7.4.7 and Red Hat Enterprise Linux 4. I want to start the Postgres Postmaster automatically when the server boots up. I have tried putting the command "/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start" In the /etc/rc.d/rc.

Re: [GENERAL] Regex

2006-02-06 Thread rlee0001
If your version does not support regexp_replace(), I have written a similar function for easlier versions of postgresql using pl/pgsql called regexp_replacex(). You can find it by searching google groups. As the thread there points out, the function I wrote doesn't treat NULLs properly as posted an

Re: [GENERAL] Any way to make PG driver obey PrintWarn?

2006-02-06 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > I'm using the DBD::Pg driver and i've specifically turned "PrintWarn" off, > yet I am still getting spammed with messages like this: > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index > ... > rt.cpan.org doesn't show any active bugs a

Re: [GENERAL] Automating backup

2006-02-06 Thread Neil Dugan
Richard Sydney-Smith wrote: Hi Doug. Many users are haphazard in their approach until the machine fails and then they expect to be pulled from the poo. Done it too many times. I now will get the application to enforce an additional integrity check. It must be backed up or else! Seems futile

Re: [GENERAL] Should I use PL/PGSQL or Perl/PGSQL?

2006-02-06 Thread Tyler MacDonald
Merlin Moncure <[EMAIL PROTECTED]> wrote: > On 2/3/06, Tyler MacDonald <[EMAIL PROTECTED]> wrote: > > I've been wondering, does anybody know which is more likely to be > > installed on a postgresql server? Which is faster? I'm writting an > > application in perl that is going to need to get

Re: [GENERAL] Any way to make PG driver obey PrintWarn?

2006-02-06 Thread Tyler MacDonald
Uwe C. Schroeder <[EMAIL PROTECTED]> wrote: > Probably because the notice you see is a notice from the database engine, > not from the driver. OK, but in order for them to get to my tty, they have to bubble down from postgres, through the UNIX/TCP socket I am talking to the driver with,

Re: [GENERAL] Should I use PL/PGSQL or Perl/PGSQL?

2006-02-06 Thread Merlin Moncure
On 2/3/06, Tyler MacDonald <[EMAIL PROTECTED]> wrote: > I've been wondering, does anybody know which is more likely to be > installed on a postgresql server? Which is faster? I'm writting an > application in perl that is going to need to get broad information about > heiarchial data (how ma

Re: [GENERAL] Any way to make PG driver obey PrintWarn?

2006-02-06 Thread Uwe C. Schroeder
Probably because the notice you see is a notice from the database engine, not from the driver. You can however turn off those notices in postgresql.conf On Monday 06 February 2006 14:30, Tyler MacDonald wrote: > I'm using the DBD::Pg driver and i've specifically turned "PrintWarn" off, > yet I

Re: [GENERAL] SELECT with REAL...

2006-02-06 Thread Niklas Johansson
On 6 feb 2006, at 19.32, Philippe Ferreira wrote: I've just realized that this way, it works very fine : SELECT * FROM mytable WHERE myreal = 13.95::real; But I still don't understand very well why I need the explicit conversion (::real) ... Try this: SELECT 13.95 = 13.95::real; It sh

[GENERAL] Any way to make PG driver obey PrintWarn?

2006-02-06 Thread Tyler MacDonald
I'm using the DBD::Pg driver and i've specifically turned "PrintWarn" off, yet I am still getting spammed with messages like this: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "aus_flag_pkey" for table "aus_flag" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "a

Re: [GENERAL] SESSION_USER vs. CURRENT_USER

2006-02-06 Thread Larry Rosenman
Emi Lu wrote: > Hello, > > Could someone clues me in the differences between SESSION_USER and > CURRENT_USER please? > Session_user is the user that started the session. Current User is the user that has been set via set local session authorization, or via the SECURITY DEFINER attribute of a fun

[GENERAL] SESSION_USER vs. CURRENT_USER

2006-02-06 Thread Emi Lu
Hello, Could someone clues me in the differences between SESSION_USER and CURRENT_USER please? Emi ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Regex

2006-02-06 Thread Tom Lane
MaRCeLO PeReiRA <[EMAIL PROTECTED]> writes: > Is there a way to execute a regex, inside a SELECT > statement, to substitute things? There's a regex_replace() function in recent PG versions. Or you could write a function in plperl or pltcl to use the regex capabilities of those languages.

[GENERAL] Regex

2006-02-06 Thread MaRCeLO PeReiRA
Hi All, Is there a way to execute a regex, inside a SELECT statement, to substitute things? For example: SELECT name FROM mytable; name - john michael robert richard chandler I want to substitute all "r" to "-" SELECT myfunction(name) FROM mytable; name - john michael

[GENERAL] ODBC driver for ps81 win32

2006-02-06 Thread josue
Hello list, What ODBC client driver should I use to connect a pg81 server running in windows, I have tried the latest psqlodbc-08_01_0200 but it only installs psqlodbca.dll and psqlodbcw.dll, the old psqlodbc.dll is missing any idea what could I doing wrong or what's the right ODBC driver I s

Re: [GENERAL] accidentally deleted rows

2006-02-06 Thread Scott Marlowe
On Sun, 2006-02-05 at 23:41, Pandurangan R S wrote: > You may be able to recover them, but you could make things worser if > you do not do it correctly. > > http://archives.postgresql.org/pgsql-patches/2005-02/msg00126.php > http://archives.postgresql.org/pgsql-general/2006-02/msg00091.php I was

Re: [GENERAL] SELECT with REAL...

2006-02-06 Thread Steve Atkins
On Feb 6, 2006, at 10:21 AM, Philippe Ferreira wrote: Comparing two floating point numbers for equality seldom works the way you want it to. Without seeing the exact data you have it's hard to say for sure (as there may be some other issue with what you're doing) but I wouldn't expect th

Re: [GENERAL] SELECT with REAL...

2006-02-06 Thread Philippe Ferreira
Hi, I've just realized that this way, it works very fine : SELECT * FROM mytable WHERE myreal = 13.95::real; But I still don't understand very well why I need the explicit conversion (::real) ... Philippe Ferreira. ---(end of broadcast)--- T

Re: [GENERAL] SELECT with REAL...

2006-02-06 Thread Philippe Ferreira
Comparing two floating point numbers for equality seldom works the way you want it to. Without seeing the exact data you have it's hard to say for sure (as there may be some other issue with what you're doing) but I wouldn't expect this to work with data from arbitrary sources. Try SELEC

Re: [HACKERS] [GENERAL] Logging statements and parameter values

2006-02-06 Thread Simon Riggs
On Mon, 2006-02-06 at 13:28 +0100, Csaba Nagy wrote: > For me the usage pattern would be: log all params, bind time values, on > the same log line as "log_min_duration" entries. That's what I need to > know which are the non-performant queries, and it also helps on > occasions to identify applicat

Re: [GENERAL] ftp download won't work

2006-02-06 Thread Martijn van Oosterhout
On Mon, Feb 06, 2006 at 05:17:20PM +0100, Leif Jensen wrote: > > Hi all, > > I have been using PostgreSQL for many years now and have never had any > problems downloading it. The last one I got hold of is 8.0.3, but now when > I try to get 8.1.2, I can get nothing to work. Many of the mi

[GENERAL] About connect to server

2006-02-06 Thread gwx cathy
Hi, everyone, I installed PostgreSql and PostGIS, I start the service and try to add a server in pgAdmin III, but I failed with a message: Error connecting to the server:FATAL;password authentication failed for user "postgres". How to fix the problem? Many thanks! Cathy _

[GENERAL] ftp download won't work

2006-02-06 Thread Leif Jensen
Hi all, I have been using PostgreSQL for many years now and have never had any problems downloading it. The last one I got hold of is 8.0.3, but now when I try to get 8.1.2, I can get nothing to work. I am behind a rather strict firewall, it has been like this for years. I checked wi

[GENERAL] Question

2006-02-06 Thread Hrishikesh Deshmukh
Hi All,I am trying to create a simpel table to handle geneId and productId but the data file which i want to read in has for some genes more than one productId ex:GeneId | ProID1 /// ProID2 /// ProID3Now how does one input the same information without having GeneId listed in the table more than onc

Re: [GENERAL] change current user in pl/pgsql function

2006-02-06 Thread Bruno Wolff III
On Mon, Feb 06, 2006 at 15:43:30 +0300, Sergey Karin <[EMAIL PROTECTED]> wrote: > Hi, List! > > I use PG8.1 > > Are there any abilities to change current user during pl/pgsql function > execution? > I developed function that have 'security definer' option and created under > superuser. But for

[GENERAL] Compile of Pgmail function fails

2006-02-06 Thread indu ss
Hello, I want to send mail on update of a field in a table. I'm using pgmail() function (from sourceforge) . I'm calling this function from another function which is called by trigger on update of the field. On executing the update statement i get error CONTEXT: compile of PL/pgSQL function "pg

[GENERAL] change current user in pl/pgsql function

2006-02-06 Thread Sergey Karin
Hi, List!I use PG8.1Are there any abilities to change current user during pl/pgsql function execution?I developed function that have 'security definer' option and created under superuser. But for executing some command in the function I need to change user to session_user and after execotion change

Re: [HACKERS] [GENERAL] Logging statements and parameter values

2006-02-06 Thread Csaba Nagy
Simon, For me the usage pattern would be: log all params, bind time values, on the same log line as "log_min_duration" entries. That's what I need to know which are the non-performant queries, and it also helps on occasions to identify application problems. In any case all your plans sound very

Re: [GENERAL] Logging statements and parameter values

2006-02-06 Thread Simon Riggs
On Mon, 2006-01-30 at 17:19 -0500, Bruce Momjian wrote: > Ted Powell wrote: > > On Mon, Jan 30, 2006 at 04:31:29PM -0500, Bruce Momjian wrote: > > > > > > I assume it is this TODO: > > > > > > * Allow protocol-level BIND parameter values to be logged > > > > > > > > >

Re: [GENERAL] Number format problem

2006-02-06 Thread Daniel Verite
Peter Eisentraut wrote: > Stéphane SCHILDKNECHT wrote: > > select to_char(1485.12, '9G999D99'); > > > But, surprinsingly, I got 1,1485,12. > > The fr_FR locale is broken. You should report this to glibc. On my debian sarge with LC_NUMERIC set to [EMAIL PROTECTED], a printf("%'g\n", 1

Re: [GENERAL] old style outer joins

2006-02-06 Thread Richard Huxton
James Harper wrote: I think the answer is no, but can anyone tell me if postgresql supports the older (pre sql-92?) style outer join syntax, eg: SELECT * FROM a,b WHERE a.pk *= b.fk I don't think that was ever part of the SQL standard - just an Oracle-ism. And no, PG doesn't support it - sorr

Re: [GENERAL] old style outer joins

2006-02-06 Thread James Harper
> On Mon, Feb 06, 2006 at 09:42:22PM +1100, James Harper wrote: > > I think the answer is no, but can anyone tell me if postgresql supports > > the older (pre sql-92?) style outer join syntax, eg: > > I think you're referring to some kind of non-standard > invented-by-oracle syntax. > > > It does

Re: [GENERAL] old style outer joins

2006-02-06 Thread Martijn van Oosterhout
On Mon, Feb 06, 2006 at 09:42:22PM +1100, James Harper wrote: > I think the answer is no, but can anyone tell me if postgresql supports > the older (pre sql-92?) style outer join syntax, eg: I think you're referring to some kind of non-standard invented-by-oracle syntax. > It doesn't appear to s

Re: [GENERAL] Source ports for psql

2006-02-06 Thread Martijn van Oosterhout
On Mon, Feb 06, 2006 at 04:35:33PM +1100, Matthew Smith wrote: > Hello Tom, > > Thanks for the reply. So in other words, the postgres clients do not use a > specific range for the source port (as a specific decision by the developers, > or as written down in a given spec), but rather relies on t

[GENERAL] old style outer joins

2006-02-06 Thread James Harper
I think the answer is no, but can anyone tell me if postgresql supports the older (pre sql-92?) style outer join syntax, eg: SELECT * FROM a,b WHERE a.pk *= b.fk It doesn't appear to support that exact syntax, which suggests it doesn't know what I'm talking about, but maybe there's a system optio

Re: [GENERAL] Automating backup

2006-02-06 Thread Richard Sydney-Smith
Thanks Doug. Think hacking the source may be the way to go. I will ask the Postgres bosses if this the idea is acceptable. We are only going to store two data items somewhere. One key-timestamp for each of autovacuum and pgdump Doug McNaught wrote: Richard Sydney-Smith <[EMAIL PROTECTED]>