Re: [GENERAL] Can I use a query with UPDATE on its SET?

2009-02-26 Thread Eus
Hi Ho! --- On Thu, 2/26/09, Craig Ringer wrote: > Eus wrote: > > Hi Ho! > > > > Since I can do: > > > > INSERT INTO table (SELECT a_transaction.*); > > > > I am wondering whether I can do: > > > > UPDATE table S

[GENERAL] Can I use a query with UPDATE on its SET?

2009-02-25 Thread Eus
INTO table (SELECT a_transaction.*); Can I? I am using PostgreSQL 8.3.5. I get the feel that I cannot do so from reading the manual. Thank you. Best regards, Eus (FSF member #4445) In this digital era, where computing technology is pervasive, your freedom depends on the software

[GENERAL] PostgreSQL fast query is too slow as function

2009-02-23 Thread Eus
not change the situtation. Any idea as to how I should attack this problem? Thank you. Best regards, Eus (FSF member #4445) In this digital era, where computing technology is pervasive, your freedom depends on the software controlling those computing devices. Join free software movement today! It

Re: [GENERAL] Why I cannot call a function from within an SQL function?

2009-02-20 Thread Eus
y instead of the ' > then you don't > need to escape. Yes, this is much better. Thank you very much for your explanation. Best regards, Eus (FSF member #4445) In this digital era, where computing technology is pervasive, your freedom depends on the software controlling those comp

Re: [GENERAL] Why I cannot call a function from within an SQL function?

2009-02-20 Thread Eus
Hi Ho! --- On Fri, 2/20/09, Ketema Harris wrote: > Use dollar quoting around your fiction body I'd double > up on the single quotes around the dash Yup, I got it. Thank you for your help. > Sent from my iPhone Best regards, Eus (FSF member #4445) In this digital era, w

Re: [GENERAL] Why I cannot call a function from within an SQL function?

2009-02-20 Thread Eus
Hi Ho! --- On Fri, 2/20/09, A. Kretschmer wrote: > In response to Eus : > > Hi Ho! > > > > The following query works well: > > > > select count (*) > > from item_audit > > where audit_ts >= '2008-05-30 00:00:00' > >

Re: [GENERAL] Why I cannot call a function from within an SQL function?

2009-02-20 Thread Eus
is the most annoying thing in e-mail? > > > > http://www.brainyquote.com/quotes/authors/m/muhammad_ali.html > > http://www.brainyquote.com/quotes/authors/e/emma_goldman.html > > http://www.brainyquote.com/quotes/authors/m/michelangelo.html > > > > >

Re: [GENERAL] Why I cannot call a function from within an SQL function?

2009-02-20 Thread Eus
Hi Ho! Sorry, let me revise the query a bit. I copied and pasted the original one from another big query. --- On Fri, 2/20/09, Eus wrote: > The following query works well: select count (*) from item_audit as ia where audit_ts >= '2008-05-30 00:00:00' and audit_ts <

[GENERAL] Why I cannot call a function from within an SQL function?

2009-02-20 Thread Eus
_part(category, '-', 2) from description where split_part(category, '-', 1) = 'item' and shorthand = ia.status ) ' language sql; What's wrong? Thank you. Best regards, Eus (FSF

Re: [GENERAL] Check for an empty result

2009-02-15 Thread Eus
Hi Andreas! --- On Fri, 2/13/09, A. Kretschmer wrote: > In response to Eus : > > Hi Ho! > > > > Is there a way to check whether or not a subquery > returns an empty result set? > > You can use EXISTS for that: > > -- empty result > test=*# select * fr

Re: [GENERAL] Check for an empty result

2009-02-15 Thread Eus
Hi Craig! --- On Fri, 2/13/09, Craig Ringer wrote: > Eus wrote: > > Hi Ho! > > > > Is there a way to check whether or not a subquery > returns an empty result set? > > "EXISTS" > > SELECT blah FROM blah WHERE EXISTS (SELECT 1 FROM tablenam

[GENERAL] Check for an empty result

2009-02-13 Thread Eus
Hi Ho! Is there a way to check whether or not a subquery returns an empty result set? Googling with the following keywords does not help: postgre check "empty result set" sql check empty result Thank you. Best regards, Eus (FSF member #4445) In this digital era, where computing

Re: [GENERAL] Using database to find file doublettes in my computer

2008-11-17 Thread Eus
00 files out of 15,000 files in about two weeks. > I know that those problems did not arise when the projects > are well > structured and in a version management system. But that > isn't here :-) I hope you employ such a system ASAP :-) > Thanks > > Lothar Best regards

Re: [GENERAL] how to "group" several records with same timestamp into one line?

2008-11-13 Thread Eus
is is better handled at the application level instead of the DB level? IOW, isn't that the cost of doing the query above far more expensive than doing a little coding at the application level? May I know your opinion? Thanks. > HTH, > >Brent Wood > > > Brent Wood > DBA/

Re: [GENERAL] Why Postgresql Public Schema Is Not Owned By The DB Owner By Default

2008-10-29 Thread Eus
to consider when assigning the ownership of a public schema of a DB to its owner that is not a SUPERUSER from the default "postgres". > regards, tom lane Best regards, Eus -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make cha

[GENERAL] Why Postgresql Public Schema Is Not Owned By The DB Owner By Default

2008-10-29 Thread Eus
tions? Particularly, what does it entail when by default the ownership of the public schema is given to the owner of the DB (from security or other aspects)? Thank you very much. Best regards, Eus -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general