[GENERAL] What is this doing? SELECT (a,b,c) FROM mytable ...

2011-04-22 Thread ljb
What syntax or operator did I (accidentally) invoke by putting parentheses around my column list? SELECT (a, b, c) FROM mytable... It gets me a single result column with comma-separated values in parentheses (see 2nd SELECT below). I can't find an explanation in the PostgreSQL manual. It doe

Re: [GENERAL] Gripe: bytea_output default => data corruption

2010-10-22 Thread ljb
vi...@khera.org wrote: >... > I had some hoops thru which I had to jump to make our app compatible with > both 8.x and 9.x so we could safely migrate our servers without having to > coordinate a code push. It wasn't that bad, but part of the problem is that > the DBD::Pg driver does not understand

Re: [GENERAL] Gripe: bytea_output default => data corruption

2010-10-21 Thread ljb
br...@momjian.us wrote: >... > Yes, we mentioned that setting in the release notes too: >... > While the "Incompatibilities" section mentions only the first paragraph, > this remention lower down has even more details. Not sure what else you > wanted us to do. Here's how I would have written that

Re: [GENERAL] Gripe: bytea_output default => data corruption

2010-10-14 Thread ljb
r...@iol.ie wrote: >... > In fairness, it *is* flagged in the release note - it's the first item > under "data types" in the list of incompatibilities. Quote: "bytea output now appears in hex format by default (Peter Eisentraut) The server parameter bytea_output can be used to select the

[GENERAL] Gripe: bytea_output default => data corruption

2010-10-12 Thread ljb
Defaulting bytea output from the backend to use hex mode encoding, which is incompatible with pre-9.0 interfaces, wasn't a friendly thing to do. The default should have been escape mode. Or else you needed a big warning in HISTORY that we must either change bytea_output, or upgrade all clients befo

Re: [GENERAL] Anyone testing changes to libpq/bcc32.mak?

2009-04-09 Thread ljb
br...@momjian.us wrote: > Magnus Hagander wrote: >> I don't know that anybody does. We usually get a report a couple of >> minor versions in and fix it then, which backs that guess. It's also >> not tested by the buildfarm. So I think you can call it semi- >> maintained at best. >> >> So if y

[GENERAL] Anyone testing changes to libpq/bcc32.mak?

2009-04-06 Thread ljb
There were some recent changes to libpq/bcc32.mak that broke my attempt to build libpq with the Borland compiler. (OK, not so recent. I've been busy.) Five new modules were added from ports/: dirent dirmod pgsleep open win32error I had to removed two, dirent.c and open.c to get the compilation to w

[GENERAL] 8.3 INSTALL: Why must I backup while my database is busy?

2008-02-23 Thread ljb
>From the 8.3.0 INSTALL file: | Upgrading | | 1. If making a backup, make sure that your database is being updated. Ouch. Revert to the language in 8.2, perhaps: 1. Make sure that your database is not updated during or after the backup. ---(end of broadcast)

Re: [GENERAL] 8.1.4: Who says "PHP deprecated addslashes since 4.0"?

2006-05-25 Thread ljb
[EMAIL PROTECTED] wrote: > ljb <[EMAIL PROTECTED]> writes: >> | addslashes() or magic_quotes. We note that these tools have been >> deprecated >> | by the PHP group since version 4.0. > >> Can anyone provide a source for the statement? > > I'm not

[GENERAL] 8.1.4: Who says "PHP deprecated addslashes since 4.0"?

2006-05-24 Thread ljb
The PostgreSQL-8.1.4 release documentation says we should be using PostgreSQL-supplied string escaping routines, not "homebrew" methods. No argument from me on this. But in the "User Guide to the 8.1.4 Security Update", it says: | An example of an application at risk is a PHP program that uses |

Re: [GENERAL] Default and PQexecParams

2005-11-28 Thread ljb
[EMAIL PROTECTED] wrote: > Hi, > > How could one differentiate between DEFAULT and 'DEFAULT' as parameters > to PQexecuteParams? I assume you mean the libpq function PQexecParams(), and you want to use a parameterized query for INSERT or UPDATE. I don't think it is possible to use DEFAULT because

Re: [GENERAL] change the last bit

2004-07-12 Thread ljb
[EMAIL PROTECTED] wrote: > I have a int4 coloumn, and I want to change the last bit the the > number in this column to 0. How can I do it? Last bit = least significant bit (LSB)? update mytable set thecolumn = thecolumn & ~1 where ... ---(end of broadcast)---

Re: [GENERAL] What does error code PGSQL_TUPLES_OK (2) actually mean?

2004-05-30 Thread ljb
[EMAIL PROTECTED] wrote: > I have ported a PHP MySQL app to PostgreSQL, and a pg_send_query() > call is returning error code 2 (PGSQL_TUPLES_OK). Unfortunately > the PHP manual lists the error codes but doesn't indicate what > they mean, and pg_result_error() returns a blank message. > > As the tok