-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
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
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
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
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
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
(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
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
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
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
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
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
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:
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
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
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
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
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
?
Alex Satrapa
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
19 matches
Mail list logo