Re: [GENERAL] Trigger vs web service

2011-04-05 Thread Jorge Godoy
code in the database, then checking how this specific function works there would also be worth a shot. -- Jorge Godoy jgo...@gmail.com On Tue, Apr 5, 2011 at 09:16, Marc-André Goderre magode...@cgq.qc.cawrote: I receive a long string (about 1 per second) than content many information

Re: [GENERAL] How to generate unique invoice numbers for each day

2011-01-15 Thread Jorge Godoy
Use a sequence. -- Jorge Godoy jgo...@gmail.com 2011/1/15 Andrus Moor kobrule...@hot.ee Invoice numbers have format yymmddn where n is sequence number in day staring at 1 for every day. command SELECT COALESCE(MAX(nullif(substring( substring(tasudok from 7), '^[0-9]*'),'')::int),0

Re: [GENERAL] How to generate unique invoice numbers foreach day

2011-01-15 Thread Jorge Godoy
Why would you do that? You can always reset the sequence at the end of the day. -- Jorge Godoy jgo...@gmail.com On Sat, Jan 15, 2011 at 17:09, Andrus Moor kobrule...@hot.ee wrote: There are 365 days in year. Do you really think pre-creating sequence for every day for every year

Re: [GENERAL] Copy From suggestion

2010-12-20 Thread Jorge Godoy
With OpenOffice.org that 65K limit goes away as well... I don't know why it is still like that today for MS Office... It is almost 2011 and they still think 64K is enough? :-) -- Jorge Godoy jgo...@gmail.com On Mon, Dec 20, 2010 at 11:49, Mark Watson mark.wat...@jurisconcept.cawrote

Re: [GENERAL] Linux

2010-11-04 Thread Jorge Godoy
is better in your environment. I am more prone to use SuSE (SLES) as I have OpenSuSE on my laptop for years now. -- Jorge Godoy jgo...@gmail.com On Thu, Nov 4, 2010 at 13:00, Michael Gould mgo...@intermodalsoftwaresolutions.net wrote: I know that this is probably a religion issue but we

Re: [GENERAL] Good candidate query for window syntax?

2010-09-10 Thread Jorge Godoy
Have you checked the OVERLAPS operator in the documentation? http://www.postgresql.org/docs/8.4/interactive/functions-datetime.html -- Jorge Godoy jgo...@gmail.com On Fri, Sep 10, 2010 at 10:03, Ketema Harris ket...@gmail.com wrote: Hello, I have a table defined as: CREATE TABLE

Re: [GENERAL] Cannot access various Postgres sites

2010-04-17 Thread Jorge Godoy
8.8.4.4 primary and 8.8.8.8 secondary and try again. You can also try using OpenDNS servers. -- Jorge Godoy jgo...@gmail.com On Sat, Apr 17, 2010 at 11:57, Eric Ridge eeb...@gmail.com wrote: I'm only subscribed to -general and -hackers, so if this message should go to a different list

Re: [GENERAL] General Question about database -- redirection

2010-04-15 Thread Jorge Godoy
create database db_1 template db_2; This will create a new DB_1 using DB_2 as template. Otherwise, you'll change your code to connect to DB_2 instead of connecting to DB_1. -- Jorge Godoy jgo...@gmail.com On Thu, Apr 15, 2010 at 14:49, akp geek akpg...@gmail.com wrote: dear all

Re: [GENERAL] serial columns with replication/cluster

2010-02-04 Thread Jorge Godoy
Sean, take a look at UUID type. It might suit you better than serial. Changing the increment also works, but puts a lot of restrictions on you (such as planning to prevent collision, having to change the increment on several nodes when adding a new node, etc.). Regards, -- Jorge Godoy jgo

Re: [GENERAL] Shall I apply normalization in the following case?

2010-02-03 Thread Jorge Godoy
benefit from a normalized structure, you'd have constraints checking for valid units and types and you wouldn't need join to get the resulting information. -- Jorge Godoy jgo...@gmail.com On Wed, Feb 3, 2010 at 23:20, Yan Cheng Cheok ycch...@yahoo.com wrote: For example

Re: [GENERAL] Experience with many schemas vs many databases

2009-11-15 Thread Jorge Godoy
became simpler and fast enough. This also allowed me to work with some other aggregates that provided very useful global statistics. -- Jorge Godoy jgo...@gmail.com On Sun, Nov 15, 2009 at 04:28, undisclosed user lovetodrinkpe...@gmail.comwrote: Hello everyone, I have hit a wall

[GENERAL] Using WITH queries on VIEWs

2009-08-30 Thread Jorge Godoy
Hi! Is it possible to use WITH queries ( http://www.postgresql.org/docs/8.4/interactive/queries-with.html) on VIEWs? I have a rather complex view that I could optimize with it... Regards, -- Jorge Godoy jgo...@gmail.com

Re: [GENERAL] storing repeating dates / events

2008-09-06 Thread Jorge Godoy
with the timestamp store a boolean that indicates if the event should consider the year or not. But you might surely design it better, specially for things that repeat on intervals other than yearly. -- Jorge Godoy [EMAIL PROTECTED] signature.asc Description: This is a digitally signed

Re: [GENERAL] storing repeating dates / events

2008-09-06 Thread Jorge Godoy
Em Saturday 06 September 2008 14:34:22 [EMAIL PROTECTED] escreveu: yes i am trying to build a alerting system where events will repeat weekly/monthly/annually what is the best way to store this kind of information in postgres? Use timestamps. And model your application with them. -- Jorge

Re: [GENERAL] upgrading from 8.1.4 to 8.3.3

2008-08-28 Thread Jorge Godoy
version upgrades is the appropriate, correct and documented way to upgrade. Check the docs and it is there. -- Jorge Godoy [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part.

Re: [GENERAL] Probably been asked a hundred times before.

2008-06-24 Thread Jorge Godoy
of a PostgreSQL package. Generating new RPMs / updating existing ones isn't so hard. -- Jorge Godoy [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part.

Re: [GENERAL] Database design questions

2008-06-18 Thread Jorge Godoy
? I would submit all of the questions in separate messages. It is tiresome to read everything, you'll loose a lot of context after one or two messages levels or reply and people won't read the email because of its size. Regards, -- Jorge Godoy [EMAIL PROTECTED] signature.asc

Re: [GENERAL] Source RPM for 8.3.3?

2008-06-14 Thread Jorge Godoy
. Specially to have more people using those standard RPM packages for all the distributions above. Regards, -- Jorge Godoy [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] Check if table or View exists

2008-03-31 Thread Jorge Godoy
follow the search path order and give you what you want without having to check anything. -- Jorge Godoy [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Using tables in other PostGreSQL database

2008-03-27 Thread Jorge Godoy
are generated from the same information -- imagine sales reporting something from last month while marketing is doing the same for this month and manufacture is insterested on the history for the same month but comparing it to the last three years history? A big mess... -- Jorge Godoy

Re: [GENERAL] Connect to postgres from a dynamic IP

2008-03-03 Thread Jorge Godoy
for that. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Connect to postgres from a dynamic IP

2008-03-03 Thread Jorge Godoy
crypto sounds like something you don't want to do. Specially if users can change their own passwords... -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate

Re: [GENERAL] Connect to postgres from a dynamic IP

2008-03-03 Thread Jorge Godoy
-- be it with SSL or SSH, for example -- will prevent the sniffer from being able to capture the hash, so your password will be safer. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] need some help on figuring out how to write a query

2008-02-23 Thread Jorge Godoy
to your function. Instead of just start date also include an optional period, in weeks, days, hours, whatever you think is the better granularity for this. So, in your interface, add the period and make 10 the default value. -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] PostgreSQL 8.3.0 RPMs are available for download

2008-02-22 Thread Jorge Godoy
and server, without the bells and whistles :-) If you use other packages that depend on PG you can't use these. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] need some help on figuring out how to write a query

2008-02-22 Thread Jorge Godoy
(value) FROM table WHERE date BETWEEN start_date AND start_date+'10 weeks'::interval; start_date:=start_date + '1 week'::interval; END WHILE; Start from that and you'll have it done. (Of course, above is pseudo code and untested...) -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] longest prefix match

2008-02-20 Thread Jorge Godoy
.) -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL]

2008-02-20 Thread Jorge Godoy
better... Or maybe some items should be promoted to an upper level :-) It is very uncommon to go up to the latest level of an index in a summary. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: Have you checked our extensive

Re: [GENERAL] the feasibility of sending email from stored procedure in Postgres

2008-02-17 Thread Jorge Godoy
. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list

Re: [GENERAL] Universal libpq.a ?

2008-02-05 Thread Jorge Godoy
:-) -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] [OT] advanced database design (long)

2008-02-04 Thread Jorge Godoy
NULL, it will cost you 1 byte (not 1 bit). If you have 9, it will cost you 2 bytes (not 9 bits). -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] PGSQL ERROR: FATAL: terminating connection due to administrator command

2008-02-04 Thread Jorge Godoy
is happening. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through

Re: [GENERAL] [pgsql-advocacy] PostgreSQL Certification

2008-02-04 Thread Jorge Godoy
Em Monday 04 February 2008 14:38:31 Csaba Nagy escreveu: Why don't you go ahead and create those special lists and make general collect all of them ? Some sort of hierarchy of lists... if doable at all, that could make everybody happy... That's an excellent idea. -- Jorge Godoy

Re: [GENERAL] Creating Aggregate functions in PLpgSQL

2007-12-13 Thread Jorge Godoy
you that they want doing some pF correction on the facility and you need to have that counted as well. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Better alternative for Primary Key then serial??

2007-12-13 Thread Jorge Godoy
??? Shouldn't the definition of a primary key be an immutable thing that is unique to the row? If you change it, then it is not immutable anymore... You can also have triggers to prevent PK updates... But I wouldn't go this route. Why are you needing updating the PKs of your data? -- Jorge

Re: [GENERAL] Hijack!

2007-12-12 Thread Jorge Godoy
to make them void when really needed. After all, if there are lots of legitimate and intended posts to public mailing lists, who would guess something that is there shouldn't be? :-) Always a good reference: http://www.goldmark.org/jeff/stupid-disclaimers/ -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] Hijack!

2007-12-12 Thread Jorge Godoy
, except it is much worse because the actual text they wrote is harder to find. The worst thing is people who bottom-posts at top-posted messages... Can you see the mess? -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9

Re: [GENERAL] Recommendations for a datasync scenario ?

2007-12-02 Thread Jorge Godoy
that there are no clashes and you don't need to rely on sequences and the correct value being used everywhere. It is the same kind of problem that we have on supermarkets and POSs: the POS has to sell even if the connection with the server is down. -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] plpython array support

2007-11-19 Thread Jorge Godoy
that on 7.4 I already had code with arrays inside the database... -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] view management

2007-11-18 Thread Jorge Godoy
dependent objects it would be great. A suboptimal alternative would be allowing the number of columns be greater than it was before -- i.e., add new columns to the view --, but block name changes for those columns and removing columns. -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-11 Thread Jorge Godoy
* of the two sides: application or database. It is always an enhancement, as if I was coding things directly by hand. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-08 Thread Jorge Godoy
. I vote for sort_nulls_first defaulting to false in order not to break bc. But then, when ordering by login date, you should use COALESCE and infinity for them (http://www.postgresql.org/docs/8.2/interactive/datatype-datetime.html). -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] Populating large DB from Perl script

2007-11-01 Thread Jorge Godoy
the order you need to restore your data. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] print command in sproc

2007-10-29 Thread Jorge Godoy
Em Tuesday 23 October 2007 07:17:53 Goboxe escreveu: Hi, What is the equivalent MSSQL 'print' command in pg sproc? What does the MSSQL 'print' command prints? -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget

Re: [GENERAL] Postgres SQL Client for Suse Linux

2007-10-29 Thread Jorge Godoy
of them. They include psql, OpenOffice.org, gda, ODBC and other. If you can be more specific it will be easier to help you. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Jorge Godoy
the DB fast is part of the solution, getting it out fast to be processes / analyzed is another part. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Have you searched our list archives? http

Re: [GENERAL] Suggestions for Remote Procedure Calls from PG, please?

2007-10-18 Thread Jorge Godoy
that has been changed and take your action based on that. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] running postgres

2007-10-18 Thread Jorge Godoy
it down as thinking out loud then. It happens. ;-) OK... But was it harder or easier than MS SQL Server? :-) -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Crosstab Problems

2007-10-18 Thread Jorge Godoy
. It isn't uncommon for people not look at their logs and it isn't uncommon for them just run command from some language using a database adapter that might not return the NOTICE output. The ERROR wouldn't pass unnoticed. -- Jorge Godoy [EMAIL PROTECTED] ---(end

Re: [GENERAL] Design Question (Time Series Data)

2007-10-04 Thread Jorge Godoy
as a parameter, then index it as well) and this would be the basis of my design for this specific condition. Having good statistics and tuning autovacuum will also help a lot on handling new inserts and deletes. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast

Re: [GENERAL] COPY for .CSV files problem

2007-10-01 Thread Jorge Godoy
catalog? COPY won't allow you to process your data. You either write something to insert record by record or you change your data to include the needed information before using COPY. I would change the input file to include the user name. -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] Postgresql and SSL

2007-09-20 Thread Jorge Godoy
is preferred since it sends encrypted passwords. At least, this is what I understand by client certificate... -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Have you searched our list archives? http

Re: [GENERAL] Postgresql and SSL

2007-09-20 Thread Jorge Godoy
On Thursday 20 September 2007 11:41:00 Tom Lane wrote: Albe Laurenz [EMAIL PROTECTED] writes: Jorge Godoy wrote: Even though one can require connections using only SSL on the server side, I don't see a method (in pg_hba.conf) that would allow clients with SSL certificates. Nor do I

Re: [GENERAL] ON UPDATE trigger question

2007-09-12 Thread Jorge Godoy
my_val IS NOT NULL. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Partial index with regexp not working

2007-09-12 Thread Jorge Godoy
the IP address on the table (maybe even NULL, it all depends on what you want). -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Suse RPM's

2007-08-03 Thread Jorge Godoy
get a .src.rpm, the tarball and run rpmbuild -bb. It works fine and I have new packages very fast. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Suse RPM's

2007-08-03 Thread Jorge Godoy
cases where it had to be handed down because of the lack of updates -- not security related, of course -- to older releases). -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ

Re: [GENERAL] Accent-insensitive search

2007-07-12 Thread Jorge Godoy
, but it works. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through

Re: [GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Jorge Godoy
. Try using Document~1 as the directory name. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Jorge Godoy
unknown reason). This looks like a Windows problem on finding directories with spaces in its name. The same happens with diacriticals... -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Geographic data sources, queries and questions

2007-05-23 Thread Jorge Godoy
is, for the purposes of querying or searching is it better to store and search a 2 byte integer that is indexed for country or state ID's, or is it better to store and search a 2 byte CHAR abbreviation? It all depends: surrogate primary keys or ... :-) (old flame starter) -- Jorge Godoy [EMAIL

Re: [GENERAL] Views- Advantages and Disadvantages

2007-05-10 Thread Jorge Godoy
in the function? And all functions called from inside the one being run as well (recursive condition, of course)... -- Jorge Godoy [EMAIL PROTECTED] pgpijw7CEq76Z.pgp Description: PGP signature

[GENERAL] Converting time to float

2007-04-27 Thread Jorge Godoy
it by 1.0 (hours), by 60.0 (minutes) or by 3600.0 (for seconds) and then adding it all up... Of course I won't do the division for hours and I'm using floats here to for a float division instead of an integer division. Any hints or a better recipe? :-) -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] Converting time to float

2007-04-27 Thread Jorge Godoy
) AS $_$ DECLARE BEGIN o_measured_time_base10:=(EXTRACT(EPOCH FROM p_measured_time) / EXTRACT(EPOCH FROM '1:00:00'::INTERVAL)); END; $_$ LANGUAGE plpgsql IMMUTABLE STRICT; Thanks for your help. -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] Audit-trail engine: getting the application's layer user_id

2007-04-25 Thread Jorge Godoy
on the due date. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Audit-trail engine: getting the application's layer user_id

2007-04-24 Thread Jorge Godoy
: a UDF (user defined function) named getapplicationid() that will return the user login / name / whatever and triggers. What is preventing you from writing that? What is your doubt with regards to how create that feature on your database? -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] Audit-trail engine: getting the application's layer user_id

2007-04-24 Thread Jorge Godoy
available in pg_catalog for your specific PostgreSQL version. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] where clause help

2007-04-23 Thread Jorge Godoy
num_prods, without the AND and the other statement. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] unique constraint on 2 columns

2007-04-20 Thread Jorge Godoy
be unique so that: name_1 never appears in name_1 or name_2 name_2 never appears in name_2 or name_1 a standard 2 column unique index / constraint will not accomplish this. But a trigger will... -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast

Re: [GENERAL] Passing arrays to stored procedures

2007-04-20 Thread Jorge Godoy
: cannot cast type character varying to bytea You meant array or bytea? neo=# select '{1, 2, 3}'::int[]; int4 - {1,2,3} (1 record) neo=# -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting/reading through

Re: [GENERAL] programmatic way to fetch latest release for a given major.minor version

2007-04-10 Thread Jorge Godoy
there is? //Magnus Just pretend that : - version = a tuple of integers (a, b, c, ...) - major = (a, b) - minor = (c, ...) Besides, that is sortable (unlike strings where 15 2) : But then, floats are as sortable as integers and 8.3 15.1... -- Jorge Godoy

Re: [GENERAL] Is there a shortage of postgresql skilled ops people

2007-03-27 Thread Jorge Godoy
have a good memory to retain information for a week, I'll excel in certification tests. But then, what after that week? I'm against certifications for any product. It just doesn't show the reality. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast

Re: [GENERAL] Approximate join on timestamps

2007-03-20 Thread Jorge Godoy
the docs if there's something that already makes your life easier :-) -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: Fwd: [GENERAL] Approximate join on timestamps

2007-03-20 Thread Jorge Godoy
x = 2 + 2 can be simplified on sight to SELECT ... WHERE x = 4, because the function underlying the integer addition operator is marked IMMUTABLE. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting

Re: [GENERAL] Design / Implementation problem

2007-03-19 Thread Jorge Godoy
something now? This is very common with miles for flights. If you fly often, you get upgrades, discounts, etc. If you don't, then you pay the fare as everybody else. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting

Re: [GENERAL] Design / Implementation problem

2007-03-18 Thread Jorge Godoy
the calculated value. Otherwise calculate it. If the user earns more points, make an entry at the raw table (for the expiration process) and increments today points. Do the same for points spent. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast

Re: [GENERAL] pg_dumpall and version confusion

2007-03-16 Thread Jorge Godoy
statically compiled versions of pg_dump. I can't even begin to imagine how difficult that would be on Windows! As difficult as a new .bat file? -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: Have you checked our extensive

Re: [GENERAL] Is This A Set Based Solution?

2007-03-16 Thread Jorge Godoy
that needs a new career... :-) -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Multiple TRIGGERs and OLD versus NEW records

2007-03-14 Thread Jorge Godoy
the previous trigger? I know that NEW propagates, but does OLD change? I suppose not and I can't confirm that now... If anyone has the answer, sharing would be nice. If I don't get any answer, I'll test and post the results later. :-) TIA, -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] Multiple TRIGGERs and OLD versus NEW records

2007-03-14 Thread Jorge Godoy
Tom Lane [EMAIL PROTECTED] writes: Jorge Godoy [EMAIL PROTECTED] writes: If I change some column -- e.g. fill in some automatic calculated column or a timestamp column --, when I run the second trigger will OLD be the data stored at the database already or will it be affected by the NEW

Re: [GENERAL] OT: Canadian Tax Database

2007-03-10 Thread Jorge Godoy
code that will translate them to a suitable message. Inserting data validation on client side helps with simple input and eliminate the average number of roundtrips needed for getting the data stored, but shouldn't be the only validation done. -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] Beginner's Questions

2007-03-09 Thread Jorge Godoy
-processor G4 with MacOS 10.4.) Are there ballpark requirements for what such a database will need to run? You have the required hardware. I have PostgreSQL running on worse conditions and performing very well. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast

Re: [GENERAL] one-to-one schema design question and ORM

2007-03-09 Thread Jorge Godoy
, then this might not be too bad... Anyway, you might also add the extra table to make it a place to gather more information that will be relevant to your system only. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Bruno Wolff III [EMAIL PROTECTED] writes: On Thu, Mar 08, 2007 at 20:32:22 -0300, Jorge Godoy [EMAIL PROTECTED] wrote: Alvaro Herrera [EMAIL PROTECTED] writes: As I said, it is easy with a function. :-) I was just curious to see if we had something like Oracle's NEXT_DAY function

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Alvaro Herrera [EMAIL PROTECTED] writes: Jorge Godoy escribió: Just to repeat my question: (I don't want to write a function, I can do that pretty easily... And I was asking if there existed some feature on the database that... It's just a curiosity) Given a date X it would return

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Bruno Wolff III [EMAIL PROTECTED] writes: On Fri, Mar 09, 2007 at 14:59:35 -0300, Jorge Godoy [EMAIL PROTECTED] wrote: It is not hard to calculate, as you can see... but it would be nice if date_trunc('week', date) could do that directly. Even if it became date_trunc('week', date, 4

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Bruno Wolff III [EMAIL PROTECTED] writes: No, it has to be inside the function so that the modular arithmetic is applied to it. Then there's the error I've shown from your command. Can you give me a working one? This was with PostgreSQL 8.2.3. -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
the call to a function in a Perl package. And to do that you have to write a function... -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
at the tenth week of the year. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Bruno Wolff III [EMAIL PROTECTED] writes: On Fri, Mar 09, 2007 at 20:13:11 -0300, Jorge Godoy [EMAIL PROTECTED] wrote: Bruno Wolff III [EMAIL PROTECTED] writes: No, it has to be inside the function so that the modular arithmetic is applied to it. Then there's the error I've shown

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
Bruno Wolff III [EMAIL PROTECTED] writes: On Fri, Mar 09, 2007 at 23:07:26 -0300, Jorge Godoy [EMAIL PROTECTED] wrote: But how to get the date if the first day of the week is a Wednesday? This example is like the ones I've sent with separate queries that needed being combined

Re: [GENERAL] Setting week starting day

2007-03-09 Thread Jorge Godoy
solves your problem. Be seeing you, -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] No buffer space available

2007-03-08 Thread Jorge Godoy
. Is there any good reason for this error to start showing up? Did your Windows change? (Updates, service packs, etc.) -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Determine users and roles

2007-03-08 Thread Jorge Godoy
the equivalent of psql -E in your command prompt and issue a \du. Be seeing you, -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Setting week starting day (was: Re: [GENERAL] Tabulate data incrementally)

2007-03-08 Thread Jorge Godoy
. Or a company that tracks the end of their activies weekly and consider the end of the week on Thursdays (so that they can send invoices on Friday). Being able to count the first day of the 'week' 5 weeks from now for the above situations would make things easier to code. :-) -- Jorge Godoy [EMAIL

Re: [GENERAL] Setting week starting day

2007-03-08 Thread Jorge Godoy
Alvaro Herrera [EMAIL PROTECTED] writes: Jorge Godoy escribió: I mean, if I wanted to do the above but instead of Sunday or Monday as the starting day I'd like using Fridays or Wednesdays... Is it possible? Writing a new function shouldn't be too hard -- it's a matter of truncating

Re: [GENERAL] date format

2007-03-04 Thread Jorge Godoy
Garry Saddington [EMAIL PROTECTED] writes: I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still rendered in the format (y,m,d) . How can I change this behaviour? ISO means y-m-d... -- Jorge Godoy [EMAIL PROTECTED] ---(end

Re: [GENERAL] Query timing

2007-03-04 Thread Jorge Godoy
only. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] rpm containing pgdump

2007-03-01 Thread Jorge Godoy
Frank Church [EMAIL PROTECTED] writes: Which of the postgresql rpms contains pgdump. I have downloaded postgresql-server and postgresql-libs and pgdump is not included. Which rpm contains it? On my SuSE box it is the 'postgresql' RPM. -- Jorge Godoy [EMAIL PROTECTED

Re: [GENERAL] performance of partitioning?

2007-02-27 Thread Jorge Godoy
here, I believe, due to the fact that data is in a different table and not on the parent one. -- Jorge Godoy [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

  1   2   3   >