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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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.
?
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
. 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
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
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
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
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
-- 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
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
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
(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
.)
--
Jorge Godoy [EMAIL PROTECTED]
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
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
.
--
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
:-)
--
Jorge Godoy [EMAIL PROTECTED]
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
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
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
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
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
???
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
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
, 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
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
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
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
* 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
. 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
the order you need to restore your data.
--
Jorge Godoy [EMAIL PROTECTED]
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
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
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
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
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
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
. 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
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
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
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
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
my_val IS NOT NULL.
--
Jorge Godoy [EMAIL PROTECTED]
---(end of broadcast)---
TIP 6: explain analyze is your friend
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
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
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
, 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
. 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
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
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
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
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
) 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
on the due date.
--
Jorge Godoy [EMAIL PROTECTED]
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
: 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
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
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/
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
: 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
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
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
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
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
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
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
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
that needs a new career... :-)
--
Jorge Godoy [EMAIL PROTECTED]
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
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
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
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
-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
, 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
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
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
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
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
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
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
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
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
solves
your problem.
Be seeing you,
--
Jorge Godoy [EMAIL PROTECTED]
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
. 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
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
. 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
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
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
only.
--
Jorge Godoy [EMAIL PROTECTED]
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
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
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 - 100 of 212 matches
Mail list logo