Re: [GENERAL] Contents of greatbridge.com?
try this: http://gborg.postgresql.org -Nick - Nick Fankhauser Business: [EMAIL PROTECTED] Phone 1.765.965.7363 Fax 1.765.962.9788 doxpop - Court records at your fingertips - http://www.doxpop.com/ Personal: [EMAIL PROTECTED] http://www.fankhausers.com ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] Encoding passwords
Is there a function out there for pg which allows you to generate a random number given a seed value? I'm trying to create a users table which would There is the following: select setseed(new seed value); This sets the seed for the random() function. However, the approach we use is more like the suggestion from Bruno Wolf that you received earlier- In our case we use JDBC to pass data between our application the database, so we use the java crypt package to encrypt everything we get before it gets stored or compared to a stored value then just compare the hash. I think his suggestion is the best way *if* your development environment supports something similar. -Nick - Nick Fankhauser Business: [EMAIL PROTECTED] Phone 1.765.965.7363 Fax 1.765.962.9788 doxpop - Court records at your fingertips - http://www.doxpop.com/ Personal: [EMAIL PROTECTED] http://www.fankhausers.com ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] connection fails
I'm not a PHP-er, but I notice that a difference between the script that works the one that doesn't is the host=... portion. Could it be that phpPgAdmin the script that works do *not* use tcpip to connect while the failing script does? If so, the message you got also contains the answer- you need to turn the tcpip_socket on in the .conf file, or change the first script to not specify a host. -Nick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: Friday, September 21, 2001 2:25 PM To: [EMAIL PROTECTED] Subject: [GENERAL] connection fails Hello, I\'m trying to connect using an extremely simple php script: $conn = pg_Connect(\host=localhost dbname=db name user=postgres password=postgres\); if ($conn) { echo \ok\; } else { echo \failed\; } I get this error message: Warning: Unable to connect to PostgreSQL server: connectDBStart() -- connect() failed: Connection refused Is the postmaster running (with -i) at \'localhost\' and accepting connections on TCP/IP port 5432? in /var/www/sts.twcable.com/launch_plan/test/c.php on line 3 failed I also tried to work from the command line and get similar error messages. The weird thing is that phpPgAdmin is working fine and this script works: $database = pg_Connect (\dbname=dbname\); pg_exec ($database, \begin\); $oid = pg_locreate ($database); echo (\$oid\\n\); $handle = pg_loopen ($database, $oid, \w\); echo (\$handle\\n\); pg_lowrite ($handle, \gaga\); pg_loclose ($handle); pg_exec ($database, \commit\); [script coming from php.net] Any ideas?? thnx! /paula :: www.nervemail.net :: free access to POP3 accounts ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
[GENERAL] Correlated subquery/update
Hi all- I'm trying to match up two tables based on a primary key, and then copy (update) a field in the second table to match a field in the first. Hard to explain well... so here's an example: select * from one; a | b - 1 | null 2 | null select * from two; c | d - 1 | one 2 | two In essence, I want to match up the records where one.a=two.c and update one.b with the value in two.d . In Oracle, I would use this statement: update one set b = (select d from two where one.a = two.c); in psql, I get a syntax error when I do this. Either a correlated subquery/update is not supported, or (more likely) I'm using the wrong approach. Can anyone tell me whether this is supported, or how I can get the job done using a different approach? Thanks! -Nick - Nick Fankhauser Business: [EMAIL PROTECTED] Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko Co. Software Consulting Services http://www.ontko.com/ Personal: [EMAIL PROTECTED] http://www.fankhausers.com
RE: [GENERAL] Correlated subquery/update
Sounds like the answer is to upgrade to v7+ Much thanks to Tom Lane and Len Morgan for the helpful responses! -Nick update one set b = (select d from two where one.a = two.c);
[GENERAL] Character type delimiters - can they be changed?
Howdy- Is there a way to change the delimiters for character/date types from single quotes to any other character? For instance, if I'm inserting "O'Brien", rather than doing something like INSERT INTO Names VALUES ('O''Brien'); I'd like to be able to use: INSERT INTO Names VALUES (~O'Brien~); I'm new to the list, so a little background on my environment and project: I'm loading many massive XML files into Postgres using a Java Program. I'm using PGQSL v6.5.2 on a Debian GNU/Linux 2.2 server. I'm using the JDBC6.5-1.2 interface. Although I can (and presently do) just replace ' with '' on all of my incoming strings, I have some performance problems, and am looking for ways to cut down on the overhead. Since XML is basically all character strings, I'm doing the replace routine on almost every field, so cutting it out would save me a bundle. I'm a newbie both to Postgres (convert from Oracle) and to JDBC, so I'm open to any suggestions, don't assume I've already thought of the "obvious" solutions! Thanks ------ --- Nick Fankhauser Business: [EMAIL PROTECTED] Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko Co. Software Consulting Services http://www.ontko.com/ Personal: [EMAIL PROTECTED] http://www.infocom.com/~nickf smime.p7s
[GENERAL] Character type delimiters - Can they be changed?
I apologize for the second post- I think my digital signature may have screwed up the first one, so I'm sending this again just to be sure... -NF Howdy- Is there a way to change the delimiters for character/date types from single quotes to any other character? For instance, if I'm inserting "O'Brien", rather than doing something like INSERT INTO Names VALUES ('O''Brien'); I'd like to be able to use: INSERT INTO Names VALUES (~O'Brien~); I'm new to the list, so a little background on my environment and project: I'm loading many massive XML files into Postgres using a Java Program. I'm using PGQSL v6.5.2 on a Debian GNU/Linux 2.2 server. I'm using the JDBC6.5-1.2 interface. Although I can (and presently do) just replace ' with '' on all of my incoming strings, I have some performance problems, and am looking for ways to cut down on the overhead. Since XML is basically all character strings, I'm doing the replace routine on almost every field, so cutting it out would save me a bundle. I'm a newbie both to Postgres (convert from Oracle) and to JDBC, so I'm open to any suggestions, don't assume I've already thought of the "obvious" solutions! Thanks ------ Nick Fankhauser Business: [EMAIL PROTECTED] Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko Co. Software Consulting Services http://www.ontko.com/ Personal: [EMAIL PROTECTED] http://www.infocom.com/~nickf
RE: [GENERAL] Newbie Question
John- According to the documentation and Bruce M's book, there is no limit. I've never hit a limit while putting some pretty large (three page) narratives in a text field. Practically speaking, I would guess that one will take a performance hit due to fragmentation when storing big chunks of data comingled with smaller chunks. -Nick Fankhauser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of John Pilley Sent: Wednesday, November 01, 2000 12:10 PM To: [EMAIL PROTECTED] Subject: [GENERAL] Newbie Question Is there an upper limit on the size of a "text" character field? If so, how can I extend it? Thanks, John