Re: [GENERAL] Anomalies with the now() function

2005-11-19 Thread David Roussel
I don't know about this particular problem, but I find in programming in general it's always best to pass in the value of now as a parameter, and pass it on to functions you are calling, thus avoiding problems with mismatching values. But as Andreas says the values should be the same within

Re: [GENERAL] shorter way to get new value of serial?

2005-11-19 Thread David Roussel
You can allocate you're numbers from a sequence... http://www.postgresql.org/docs/7.4/interactive/functions-sequence.html Then you can peek at the sequence to see what was last allocated. Exactly how you do it depends on your circumstances. On 18 Nov 2005, at 13:26, Harald Armin Massa wrote:

Re: [GENERAL] Table modifications with dependent views - best practices?

2005-04-24 Thread David Roussel
So I have a scenario in which account creation at the application layer generates a set of tables and indexes. The tables created have foreign keys to tables in use (and frequently read from and written to) by the rest of the application. Occasionally I was getting deadlocks, and this definitel

Re: [GENERAL] Migrating MySQL app to postgres?

2005-04-22 Thread David Roussel
The only linux app I can find that does the job is SugarCRM. However, they use mysql as their backend. Might it be relatively easy for me to change the code so it will work with postgres? What's involved? Rich, what's wrong with the app as it is? Why change anything? ---(en

Re: [GENERAL] libpq Unicode support?

2005-04-22 Thread David Roussel
Do other databases support both UTf8 and UTF16? Oracle supports UTF-8, UTF-16 an some other special UFT encodings. I think some of them are pre UTF-8 becoming ratified, hence they are partially compatible. It's an install time option for an Oracle database. ASCII databases can be upgraded to

Re: [GENERAL] PHP and Postgresql on Windows

2005-04-22 Thread David Roussel
Try PEAR DB. http://pear.php.net/package/DB It's a database abstraction layer, which means that you can change DB later, with less hasle. Have a look at how phpPgAdmin works. Download the source and have a look. http://phppgadmin.sourceforge.net/ On 22 Apr 2005, at 20:04, [EMAIL PROTECTED] wro

Re: [GENERAL] Table modifications with dependent views - best

2005-04-22 Thread David Roussel
> I usually put DDL statements in a transaction, for a couple of > reasons: so that a mistake doesn't leave me with half-done work > (any error will cause the entire transaction to roll back), and to > make the changes atomic for the benefit of other transactions. Can you do that in postgres? Wi