[GENERAL] Dilbert Experiences a 'Database Manager' moment

2003-10-18 Thread Dennis Gearon
Priceless cartoon in middle of page: http://cbbrowne.com/info/rdbms.html -- "You are behaving like a man", is an insult from some women, a compliment from an good woman. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[GENERAL] convert string function and built-in conversions

2003-10-18 Thread culley harrelson
It seems to me that these values should be the same: select 'lydia eugenia treviño', convert('lydia eugenia treviño' using ascii_to_utf_8); but they seem to be different. What am I missing? culley ---(end of broadcast)--- TIP 8: explain analyze i

[GENERAL] plpgsql

2003-10-18 Thread Martin Marques
We are trying to make some things work with plpgsql. The problem is that I built several functions that call one another, and I thought that the way of calling it was just making the assign: var:=func1(arg1,arg2); which gave me an error near ")". Now if I did the same, but like this: PERFORM

Re: [GENERAL] Timestamp to date conversion...plz help me

2003-10-18 Thread nolan
> I want to extract date part (mm/dd/yy or any other date format) of Time= > stamp in postgreSQL. Can anyone help me out how I can proceed?. You have at least two choices: select current_timestamp::date; will give you the date in the default date format. select to_char(current_timest

Re: [GENERAL] 7.4b4 domain usage and select question

2003-10-18 Thread Alvaro Herrera
On Sat, Oct 18, 2003 at 01:40:04PM -0600, Robert Creager wrote: > But, I cannot turn of logging of the duration! It's set to > log_min_duration_statement = 0, but still logs the duration of every > statement. This didn't happen with 7.4b4... I've set it high to not > log most statements. The v

Re: [GENERAL] 7.4b4 domain usage and select question

2003-10-18 Thread Robert Creager
When grilled further on (Sat, 18 Oct 2003 15:46:55 -0400), Tom Lane <[EMAIL PROTECTED]> confessed: > Robert Creager <[EMAIL PROTECTED]> writes: > > But, I cannot turn of logging of the duration! It's set to > > log_min_duration_statement = 0, > > -1 turns it off now. > Thanks. Didn't even thi

Re: [GENERAL] 7.4b4 domain usage and select question

2003-10-18 Thread Tom Lane
Robert Creager <[EMAIL PROTECTED]> writes: > But, I cannot turn of logging of the duration! It's set to > log_min_duration_statement = 0, -1 turns it off now. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/rea

Re: [GENERAL] 7.4b4 domain usage and select question

2003-10-18 Thread Robert Creager
When grilled further on (Sat, 18 Oct 2003 13:12:41 -0400), Tom Lane <[EMAIL PROTECTED]> confessed: > Robert Creager <[EMAIL PROTECTED]> writes: > > select * from test_table where field_1 = '1'; -- fails > > The last select fails with 'operator is not unique: test_domain = "unknown"' > > Works as

Re: [GENERAL] Timestamp to date conversion...plz help me

2003-10-18 Thread Alvaro Herrera
On Sat, Oct 18, 2003 at 10:21:03PM +0530, Jitender Kumar C wrote: > Hi, > I want to extract date part (mm/dd/yy or any other date format) of > Timestamp in postgreSQL. Can anyone help me out how I can > proceed?. SELECT your-timestamp-value::date or, more standard, SELECT CAST(your-t

Re: [GENERAL] restart and postgres.conf

2003-10-18 Thread CSN
> El Vie 17 Oct 2003 16:43, escribió: > >> Should "restart" with pg_ctl or > /etc/init.d/postgres > >> cause postgres.conf to be reread? It doesn't > appear > to > >> do so for me (another oddity - after "restart" > the > >> last line in the log is "database system is shut > >> down"). "stop" follo

[GENERAL] 7.4b4 domain usage and select question

2003-10-18 Thread Robert Creager
I'm using 7.4b4 with domains, and am having a problem with selecting without casting. create domain test_domain as integer check( (value notnull) and (value >= 1) ); create table test_table( field_1 test_domain, field_2 integer ); insert into test_table values( 1, 1 ); insert into test_table valu

Re: [GENERAL] 7.4b4 domain usage and select question

2003-10-18 Thread Tom Lane
Robert Creager <[EMAIL PROTECTED]> writes: > select * from test_table where field_1 = '1'; -- fails > The last select fails with 'operator is not unique: test_domain = "unknown"' Works as expected in CVS tip ... regards, tom lane ---(end of broadca

Re: [GENERAL] plpgsql: return multiple result sets

2003-10-18 Thread Jeff Eckermann
--- Oksana Yasynska <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm running Postgres 7.2.1 and I need to return > multiple row sets from plpgsql > function. I'm new in plpgsql but according > documentation and everything I > could find in the mailing list I need to switch to > 7.3 to get at least S

[GENERAL] Timestamp to date conversion...plz help me

2003-10-18 Thread Jitender Kumar C
Hi,     I want to extract date part (mm/dd/yy or any other date format) of Timestamp in postgreSQL.  Can anyone help me out how I can proceed?.  Regards,  Ch.V.J. Kumar |Associate Consultant | iGATE Global Solutions Limited | Office: 5521701 xtn  3031 | 9886219429|  [EMAIL PROTECTED]  

Re: [GENERAL] Postgres seems to BE on windowsXP

2003-10-18 Thread Jason Sheets
Postgres will run on windows under cygwin, you can also set it up as a service. Native win32 support will be coming to PostgreSQL sometime soon (not 7.4 but soon). If you wanted Postgres on windows now you could get mammoth postgresql from the folks at commandprompt.com. Jason Dennis Gearon

[GENERAL] plpgsql: return multiple result sets

2003-10-18 Thread Oksana Yasynska
Hi all, I'm running Postgres 7.2.1 and I need to return multiple row sets from plpgsql function. I'm new in plpgsql but according documentation and everything I could find in the mailing list I need to switch to 7.3 to get at least SETOF rows as a result. I can't really upgrade Postgres now. I

Re: [GENERAL] How to quote text before inserting into database?

2003-10-18 Thread Tino Wildenhain
Hi Scott, Scott Chapman wrote: I am working with Python (psycopg). I have HTML with embedded Python that I'm inserting into a database and it could contain any character. Single quotes, at least, must be escaped (to two single quotes, right?) before inserting it into Postgres. This poses a