Re: [GENERAL] boolean to int

2004-03-15 Thread Alex Satrapa
-to-front ;) create or replace function bool2int (boolean) returns integer as ' select case when $1 then 1 else 0 end; ' language sql Thanks for the example of the use of casts. Alex Satrapa ---(end of broadcast)--- TIP 1: subscribe and unsubscribe

[GENERAL] Foreign Key on Inheriting Table?

2004-02-08 Thread Alex Satrapa
advantage of the object-relational features of PostgreSQL to make my work a little easier. Does anyone know whether I'm just doing something wrong, or is the old documentation still correct? Thanks Alex Satrapa ---(end of broadcast)--- TIP 8: explain

Re: [GENERAL] Foreign Key on Inheriting Table?

2004-02-08 Thread Alex Satrapa
then be alerted to the problem before it bites them. For the record, this foreign key not working on tables defined using inherit issue affects all versions of PostgreSQL up to at least 7.4.1. HTH Alex Satrapa ---(end of broadcast)--- TIP 4: Don't

Re: [GENERAL] Best practice? Web application: single PostgreSQL

2004-01-13 Thread Alex Satrapa
database such as select * from credit_card_details; truncate invoices; drop table accounts_receivable; etc. Regards Alex Satrapa ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail

Re: [GENERAL] sql insert function

2004-01-12 Thread Alex Satrapa
Chris Ochs wrote: CREATE FUNCTION taxship(varchar,integer,varchar,float,float) returns integer AS ' insert into taxship(s_oid,order_id,mer_id,tax,shipping) values ('$1',$2,'$3',$4,$5); SELECT 1; ' LANGUAGE SQL; try CREATE FUNCTION taxship (varchar,integer,varchar,float,float) RETURNS integer AS

Re: [GENERAL] sql insert function

2004-01-12 Thread Alex Satrapa
Chris Ochs wrote: Never mind, I forgot to quote the quote's... Heh... and here I was thinking you were trying to build a function ;) And I made the same mistake as you... guess I should proofread instead of copy-pasting ;) Alex Satrapa ---(end of broadcast

Re: [GENERAL] Parse error help needed...

2004-01-12 Thread Alex Satrapa
(i,''Test''); end loop; return s_out; End; ' language 'plpgsql'; The rest looks fine (works for me - yes I tested it this time) Alex Satrapa ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your

Re: [GENERAL] sql insert function

2004-01-12 Thread Alex Satrapa
to AutoCommit behaviour, unless you explicitly turn it off: my $dbh = DBI-connect ( DBI:Pg:dbname=database, user , password, {AutoCommit = 0} ); HTH Alex Satrapa ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ

Re: [GENERAL] Any commercial shopping cart packages using postgresql?

2003-12-16 Thread Alex Satrapa
Alex Satrapa wrote: I'm currently exploring the Zelerate AllCommerce system http://allcommerce.sourceforge.net Ick... this product is *so* the poster child of the MySQL generation: # # Table structure for table 'addresses' # CREATE TABLE addresses

Re: [GENERAL] Any commercial shopping cart packages using postgresql?

2003-12-16 Thread Alex Satrapa
Dann Corbit wrote: But as for the DEFAULT '' NOT NULL entries, CODD and Date eventually decided that NULL data was a big mistake. While SQL programmers are used to it, most end users with slim SQL familiarity will be pretty shocked when: And so, too, will man people with little or no understanding

Re: [GENERAL] Any commercial shopping cart packages using postgresql?

2003-12-10 Thread Alex Satrapa
Mike Nolan wrote: I may need to move a web store to another hosting facility or rewrite it. I'm currently exploring the Zelerate AllCommerce system http://allcommerce.sourceforge.net I haven't even reached the stage of installing it yet. It's designed to run out-of-the-box on MySQL, so I'm a

Re: [GENERAL] PostgreSQL Advocacy, Thoughts and Comments

2003-12-04 Thread Alex Satrapa
Chris Travers wrote: Here is a paper I have written for the purposes of providing some additional educational material for the MySQL crowd. Here's my contribution: Why I choose PostgreSQL (PostgreSQL in 21 Seconds) I choose referential integrity, meaning my lookups always work. I choose

Re: [GENERAL] DBD::Pg problem

2003-12-03 Thread Alex Satrapa
Ausrack Webmaster wrote: The thing is...I am not. I am inserting it into a varchar field. Are there any single quotes in the message body? They will wreak havoc with the rest of the query. And why are you putting single quotes around '$parent'? What happens if you move the '$body' to the end:

Re: [GENERAL] Pronouncing PostgreSQL

2003-12-03 Thread Alex Satrapa
John Wells wrote: Ok...this has irritated me for sometime. I've seen reference to dividing it up into proper syllables in the mailing archives, but couldn't find pronunciation of the gres part... FOLDOC (Free Online Dictionary of Computing) says: PostgreSQL database /'post-gres-kyu-el/ An

Re: [GENERAL] Undropping a column?

2003-12-01 Thread Alex Satrapa
Tom Lane wrote: Greg Stark [EMAIL PROTECTED] writes: I just dropped a column that I wish I hadn't. Is there some simple update i could do to the pg_* tables that would undrop it? You could rsync the database back from your live off-site backup, or rifle through the piles of backups to recover

Re: [GENERAL] disaster recovery

2003-11-26 Thread Alex Satrapa
Jason Tesser wrote: We are evaluating Postgres and would like some input about disaster recovery. I'm going to try to communicate what I understand, and other list members can correct me at their selected level of vehemence :) Please send corrections to the list - I may take days to post

Re: [GENERAL] Where is Postgesql ? - MYSQL SURPRISES WITH MAXDB /

2003-11-24 Thread Alex Satrapa
Randolf Richardson wrote: From my perspective MySQL and PostgreSQL are completely different projects (for starters they even use different licensing schemes -- BSD v. GPL) that are in competition. Since PostgreSQL stands on its own without any dependencies on MySQL, I don't see any reason

Re: [GENERAL] Humor me: Postgresql vs. MySql (esp. licensing)

2003-11-19 Thread Alex Satrapa
Randolf Richardson, DevNet SysOp 29 wrote: [sNip] Do a shutdown -h on a live database machine with pg. It will gracefully shut itself down. Is that true for all OS flavors and is it dependent upon the DBA having set up proper shutdown scripts? [sNip] When I tested this on PostgreSQL on

[GENERAL] Query Planner Filtering Of Specified Value From 'On Distinct' Clause

2003-11-18 Thread Alex Satrapa
? Alex Satrapa ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org