Re: [SQL] Week to date function

2010-03-27 Thread Jorge Godoy
December is always in the last week of its year. The week number can be described by counting the Thursdays: week 12 contains the 12th Thursday of the year. In 2009, January 1st. happened on a Thursday. As Jan 1st, 2010 happened on a Friday, it was on week 53 of 2009. -- Jorge Godoy jgo

Re: [SQL] Week to date function

2010-03-27 Thread Jorge Godoy
on Monday. In Portuguese, the word for Monday can also be translated as Second, as in Second day. How to say that the second day is in fact the first? :-) -- Jorge Godoy jgo...@gmail.com On Sat, Mar 27, 2010 at 18:31, Hiltibidal, Rob rob.hiltibi...@argushealth.com wrote: U only 52 calendar

Re: [SQL] installing uuid generators

2010-03-16 Thread Jorge Godoy
| The Programs Needed to Create and Run a PostgreSQL Server | package | python-storm-postgresql| PostgreSQL backend for python-storm | package And no, uuid-ossp isn't there. -- Jorge Godoy jgo...@gmail.com On Tue, Mar 16, 2010

Re: [SQL] Month/year between two dates

2009-08-12 Thread Jorge Godoy
) test=# -- Jorge Godoy jgo...@gmail.com On Wed, Aug 12, 2009 at 00:59, ramasubramanian ramasubramania...@renaissance-it.com wrote: Dear Bor, How you will 1 record for 2009/05 (if you use 2009/05 ) it will fetch all the records as it is not having month 05 am i correct? - Original

Re: [SQL] Composite UNIQUE across two tables?

2008-03-06 Thread Jorge Godoy
, but it can be done. -- Jorge Godoy [EMAIL PROTECTED] -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Installing with libs of postgresql-libs

2007-03-12 Thread Jorge Godoy
.rpm I think it is just a metter of rpm -qa postgresql-libs-8.2.3-1PGDG.i686.rpm but I do not have the adm permissions. You don't need them to query or list the contents of uninstalled packages. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast

Re: [SQL] Distribution of results

2006-11-06 Thread Jorge Godoy
this isn't hard if you use a statistical function. You can have one fairly quickly with PL/R. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] [GENERAL] How to split a table?

2006-10-17 Thread Jorge Godoy
selecting rows until he has reached 60% of that total. Otherwise he might end up with something completely different from what he wants. On the other hand if he wants rows whose randomness factor at the time they were looked at was bigger than 0.6 then he can use that rand() trick. -- Jorge Godoy

Re: [SQL] on connect/on disconnect

2006-09-11 Thread Jorge Godoy
/docs/8.1/interactive/sql-set-session-authorization.html Also just for completeness: http://www.securityfocus.com/bid/16650/info -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ

Re: [SQL] Multiple DB join

2006-08-15 Thread Jorge Godoy
another one. Disk space can be solved with new disks and tablespaces, but we can't yet distribute the load through several servers without partitioning. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] Multiple DB join

2006-08-15 Thread Jorge Godoy
Andrew Sullivan [EMAIL PROTECTED] writes: On Tue, Aug 15, 2006 at 09:01:03AM -0300, Jorge Godoy wrote: I can think that spreading processing requirements should be one. And distributing load another one. Disk space can be solved with new disks and tablespaces, but we can't yet distribute

Re: [SQL] Constraint UNIQUE on a column not case sensitive

2006-07-01 Thread Jorge Godoy
The idea is to have an index on that column, in a not case sensitive form, i.e. lower(MyColumn). What's the problem with CREATE INDEX then? CREATE INDEX idx_something ON mytable (lower(mycolumn)); -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast

[SQL] (Ab)Using schemas and inheritance

2006-05-23 Thread Jorge Godoy
-- probably at least one per schema + some common groups -- and roles as well... Is this a good idea? Would this be too bad, performance-wise, if I had thousands of schemas to use like that? Any advice on better approaches? Any expected problems? TIA, -- Jorge Godoy [EMAIL PROTECTED

Re: [SQL] Returning String as Integer

2006-05-06 Thread Jorge Godoy
Em Sábado 06 Maio 2006 17:05, Ben K. escreveu: Jorge Godoy [EMAIL PROTECTED] wrote: numbers. Is there any way to select a value from this column and return it as an integer? My twopence. I just happened to have the same problem with iReports for a 10 digit number - it may be case specific

[SQL] Creating nested functions with plpgsql

2006-05-02 Thread Jorge Godoy
functions. If it is not possible, are there any plans to allow this kind of thing? (Even with a different syntax it would be good to have it.) TIA, -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: explain analyze is your