Re: [GENERAL] Replication

2009-06-22 Thread Conrad Lender
On 23/06/09 03:44, Scott Marlowe wrote: > On Mon, Jun 22, 2009 at 4:51 PM, Gerry Reno wrote: >> Londiste is beta. The fact that Skype uses it is because it's part >> of Skytools which is their product. They may want to run their own >> beta stuff. I don't. > > So, if they said it was general rel

Re: [GENERAL] Code tables, conditional foreign keys?

2009-05-26 Thread Conrad Lender
On 26/05/09 20:48, Benjamin Smith wrote: > "A deep unwavering belief is a sure sign that you're missing > something." -- Unknown > > I had no intention of sparking an ideological discussion. I know, my apologies for going off-topic. I just had a deja-vu when I saw Celko's article about EAV disast

Re: [GENERAL] Code tables, conditional foreign keys?

2009-05-23 Thread Conrad Lender
On 23/05/09 09:34, Scott Marlowe wrote: > I have a great deal of respect for Celko. I don't always agree with > everything he says, but most of it makes a lot of sense to me. I didn't intend any disrespect to Joe Celko. I have read a number of his articles, which tend to be well written and info

Re: [GENERAL] Code tables, conditional foreign keys?

2009-05-22 Thread Conrad Lender
On 23/05/09 06:05, Rodrigo E. De León Plicet wrote: >>> Is there a better way? >> >> Yeah, natural keys. > > +1. > > Also, what Ben described reeks of EAV. > > Ben, please read: > > http://joecelkothesqlapprentice.blogspot.com/2006/04/using-one-table-vs-many.html Ah yes, the great Celko. I ha

Re: [GENERAL] "No transaction in progress" warning

2009-05-08 Thread Conrad Lender
On 08/05/09 16:43, Conrad Lender wrote: > stderr to stdin to capture warnings and errors: That should be "stderr to stdout", of course. - Conrad -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql

Re: [GENERAL] "No transaction in progress" warning

2009-05-08 Thread Conrad Lender
On 07/05/09 18:26, Tom Lane wrote: > Scott Mead writes: >> How did you restart postgres? I'm guessing that you're using a >> distribution provided package. If you're using the /etc/init.d >> scripts from that package, it's likely that the startup script is >> redirecting stderr and that the syst

Re: [GENERAL] "No transaction in progress" warning

2009-05-07 Thread Conrad Lender
On 07/05/09 16:56, Adrian Klaver wrote: >> The server startup messages were in this file (which is why I >> assumed it was the correct one), but for some reason after a >> restart the logs were created as >> >> /var/log/postgresql/postgresql-8.3-main.log.1241706461 [...] > is done in the zone spec

Re: [GENERAL] "No transaction in progress" warning

2009-05-07 Thread Conrad Lender
On 07/05/09 15:58, Tom Lane wrote: > What seems most likely is that you're looking at the wrong log file. > Recheck the "where to log" settings. Thanks, Adrian and Tom, you were right, I wasn't looking at the correct file. My postgresql.conf has: log_directory = '/var/log/postgresql' log_filenam

[GENERAL] "No transaction in progress" warning

2009-05-07 Thread Conrad Lender
Hello. We've recently discovered a bug in our code that resulted in COMMITs without BEGINs, and our client saw "no transaction in progress" warnings in his log file. What worries me is that we didn't discover this problem during development - the warning doesn't show up in our logs. We're both usi

Re: [GENERAL] standard_conforming_strings and pg_escape_string()

2009-04-24 Thread Conrad Lender
On 24/04/09 14:49, Daniel Verite wrote: > It works for me: > > $ php -e > echo phpversion(), "\n"; > $c=pg_connect("dbname=mail user=daniel host=/tmp port=5000"); > pg_query("SET standard_conforming_strings=off"); > echo pg_escape_string('toto\titi'), "\n"; > pg_query("SET standard_conforming_str

Re: [GENERAL] standard_conforming_strings and pg_escape_string()

2009-04-23 Thread Conrad Lender
Tom, thanks for your reply. On 24/04/09 00:56, Tom Lane wrote: >> if ($escWildcards) { >> $str = strtr($str, array("%" => '\%', "_" => '\_')); >> } >> return "E'" . pg_escape_string($str) . "'"; > > The above cannot possibly work. pg_escape_string is generating what it > supposes to b

[GENERAL] standard_conforming_strings and pg_escape_string()

2009-04-23 Thread Conrad Lender
Hi. I'm using PostgreSQL 8.3 with PHP's "pgsql" module (libpq 8.3.7). When the server's standard_conforming_strings setting is off (this is currently still the default, I believe), I use something like this to escape strings: if ($escWildcards) { $str = strtr($str, array("%" => '\%', "_" =>