[GENERAL] Generating unique session ids

2006-07-26 Thread Antimon
Hi, I need to generate sessions for logged in users to my website which uses pgsql. So i decided to write a function which is this: --- CREATE OR REPLACE FUNCTION session_createsession(int4, "varchar") RETURNS text AS $BODY$ DECLARE sid TEXT; BEGIN sid :

Re: [GENERAL] Timestamp vs timestamptz

2006-07-14 Thread Antimon
tijn van Oosterhout wrote: > On Thu, Jul 13, 2006 at 04:35:20PM -0700, Antimon wrote: > > Hi, > > I'm working on a web project with pgsql, i did use mysql before and > > stored epoch in database so i'm not familiar with these datatypes. > > > > Wha

[GENERAL] Timestamp vs timestamptz

2006-07-13 Thread Antimon
Hi, I'm working on a web project with pgsql, i did use mysql before and stored epoch in database so i'm not familiar with these datatypes. What i wanna ask is, if i don't need to display timestamps in different timezones, shall i use timestamptz anyway? I mean, i'm gonna need timestamp columns on

[GENERAL] Large text data

2006-04-06 Thread Antimon
Hi, I need to store text entries and i use text datatype. I want to ask if it will be better to split text and entry information? I mean, i can use a table like, (id, authorid, insertdate, editdate, threadid, textdata) or i can have an entrytexts table (id, entryid, textdata) and a foreign key on

Re: [GENERAL] PostgreSQL client api

2006-03-29 Thread Antimon
Yes i tried and realized apache child processes.. Then i looked for another pooling solution, the project pgpool i found. No windows binaries, it might run on cygwin. After all, i think postgreSQL is not meant to run on windows production for ~2 more major releases or something. It performs great o

Re: [GENERAL] PostgreSQL client api

2006-03-29 Thread Antimon
Just tried, yes, pconnect boosts multi user performance. But causes this: http://img526.imageshack.us/img526/6302/pgsql7th.jpg :) Need to modify max persistent connection settings. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [GENERAL] PostgreSQL client api

2006-03-29 Thread Antimon
Just noticed, On windows, these results are produced. But on linux, postgresql performs great. So postgre has a bad windows integration than mysql. Well since it supports win32 for a long time, it makes sense. I did some "multi client" tests and postgre could not even catch mysql so i decided to go

Re: [GENERAL] PostgreSQL client api

2006-03-29 Thread Antimon
Hi, I'm sorry about being understood like i was trying to compare pgsql with mysql. I was trying stuff, did this and saw that huge difference (even it is not bad alone, but comparing to mysql), and thought that might be some library issue causing slow reads from server. I don't need any rdbms to be

Re: [GENERAL] PostgreSQL client api

2006-03-29 Thread Antimon
I know this is not even a test but i thought it might be a client library issue, not server itself. Well it is not, i tried it on .net with npgsql which is a .net client library (Not using libpq). Results are same. Connect time does not have much effect by the way. ---(end

[GENERAL] PostgreSQL client api

2006-03-28 Thread Antimon
Hi, I was testing MySQL and PgSQL performances on my home box (amd athlon 64 3000, 1gig ddr ram, sata I hdd, win xp (x86)), select and insert times seeemed identical with innoDB. But when i try to query both using php, there's a huge difference even for a funny query like "select 1" Here's the co

Re: [GENERAL] Php abstraction layers

2005-08-31 Thread Antimon
I wrote a wrapper class based on pg_ functions. Added some logging and exception throwing capabilities etc. I'm planning to use only prepared statements and pg_query_params function when using user submitted data in queries to avoid sql-injection. I believe it is enough but gonna do some tests. Thi

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Antimon
Thanks for the reply. I checked new 5.1 pg_ functions and i wanna ask something else. What do you think about PDO? It is not an abstraction layer, just something like wrapper. I thought as it supports both widely used dbmss, php developers would focus on it more than pg or mysqli functions and that

[GENERAL] Php abstraction layers

2005-08-30 Thread Antimon
Hi, I'm working on a new web project based on php and i decided to use PostgreSQL 8.x as dbms. For triggers, views, stored procedures etc. I was going to write a simple wrapper class and use pg_* functions. But some friends adviced me to use an abstraction layer. I checked PEAR:DB and AdoDB. They l