allow this (i.e. disallows revoking
of access) should be taken out and shot quickly. Any language of
reasonable complexity will support some form of information hiding (aka
abstraction) and suggesting you can stop this by disallowing revoking of
access is just silly.
> Sam Mason wrote:
> &g
1. b
2. c
3. d
4. b and c
I do most of my admin using SQL these days. my preference would be
towards keeping them because they're nice in the beginning.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
ny ideas?
Looks like you've "disabled" seqscans. Because seqscan is a fallback
method all disabling does is to make it very expensive. To check:
SHOW enable_seqscan;
If it's set then have a look in the config file, or maybe reset the
per-role setting using ALTER ROLE[1].
st had a look at its source and
gave up trying to understand it rather quickly.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Wed, Mar 26, 2008 at 01:26:03PM -0700, Sam wrote:
> Iam trying to update a database table with approx 45000 rows. Iam not
> updating all rows at a time. Iam updating 60 rows at a given time for
> example. and this is happening in a FOR LOOP. A function that has the
> update statemen
TE FROM cust_portal.tmp_newsletterreg WHERE email = $3;
$$;
Sam
[1] http://www.postgresql.org/docs/current/static/sql-savepoint.html
[2]
http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
--
Sent via pgsql-general mailing list (pgsq
ROM users) u ON s.email = u.email;
Why not put a foreign key on the "email" column to the users table---one
less error to handle that way?
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
OP, he seems to be missing a
lot of the tools that databases' give you. Transactions and unique
constraints being two significant ones. Writing stored procedures to do
their work is just going to introduce unnecessary bugs and complication.
Sam
--
Sent via pgsql-general mailing list (
On Fri, Mar 28, 2008 at 06:43:00PM +0900, Craig Ringer wrote:
> Alain Roger wrote:
> > I do not agree with you Sam.
> >
> > Stored procedure are safe from hacking (from external access).
>
> In that a stored procedure encapsulates a series of data operations,
> m
BY value, id) x
ORDER BY order;
No programming language will ever do exactly what you want straight
away, it's a matter of using the tools it gives you.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Sat, Mar 29, 2008 at 04:05:15AM +0900, Craig Ringer wrote:
> Sam Mason wrote:
> >>ALTER TABLE tmp_newsletterreg ADD CONSTRAINT simplistic_email_check
> >>CHECK lower(trim(both ' ' from email)) LIKE '[EMAIL PROTECTED]';
> >
> >Just ou
your database drivers are somehow mangling the statement
somewhere between your code and the database. You could try running it
locally from inside psql to find out.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Fri, Mar 28, 2008 at 05:29:06PM -0400, Terry Lee Tucker wrote:
> Thanks Sam. No, that is not what I tried. I had tried:
> UPDATE bill SET notes = 'blah, blah, yeaE'\n'more stuff.'
> It didn't dawn on me that the E went in front of the whole string!
it's a
ut what this word means before using it too much as,
again, it has a very specific technical meaning. However in Access
you can perform a "Link Tables..." command which is what you may be
describing, based upon the remainder of your description I doubt it
though.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
nd prevent possible collisions at the same time?
This problem is always going to be awkward with a relational database
though. The problem you want to solve is the opposite of their model.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
re) x, (SELECT count(*) AS total FROM scoretable) y
ORDER BY score;
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
lls "Login Roles(1)".
Users and Roles are very similar and all the old commands for dealing
with users should still be there and automatically do the appropriate
thing.
If you don't get far, can you post the exact commands you're running and
their responses and we may be able to
as
early as possible. I personally think, and there's a lot of research
saying the same thing, that statically-typed and safe languages with
formally defined semantics are good tools here. PHP is a tool for
writing code quickly, not for writing high assurance code.
Sam
--
Sent via p
e space between the ELSE and the IF which is introducing a new
sub-expression. Either that, or move the RETURN after the final END IF.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
sion can occur (and seems to occur reasonably often
based on previous posts to the mailing lists) suggests that the docs
should highlight the differences more clearly.
I'd also hazard a guess that we don't hear about it more because most
people just work within a single time zone an
On Tue, Apr 15, 2008 at 04:04:20PM +0200, Karsten Hilbert wrote:
> On Tue, Apr 15, 2008 at 02:31:22PM +0100, Sam Mason wrote:
> > On Tue, Apr 15, 2008 at 02:46:14PM +0200, Karsten Hilbert wrote:
> > > Of course, the actual time stored in the database in UTC is
> > > qu
On Tue, Apr 15, 2008 at 06:48:27AM -0700, Adrian Klaver wrote:
> On Tuesday 15 April 2008 6:31 am, Sam Mason wrote:
> > My reasoning goes something like this: The WITH and WITHOUT clauses
> > seem to be the opposite of my naive understanding of their purpose. I'd
> >
providing hints (proofs would be the normal use) to the
planner about what's going to happen when the code is run.
This seems to imply that types couldn't be stored as OIDs any more
(you'd be creating and destroying lots while planning the query) so
would probably change the st
On Wed, Apr 16, 2008 at 05:09:56PM +0200, Karsten Hilbert wrote:
> On Tue, Apr 15, 2008 at 03:31:46PM +0100, Sam Mason wrote:
> > But I was under the impression that you didn't want any time zone
> > information.
> Wrong impression.
Doh, yes.
> > I must be missing so
changing the literals to represent values
of different types and seeing how the result changes. You may get
some mileage out of using EXPLAIN VERBOSE (you can see the cast being
inserted in the 9./10 case, when compared to 9/10---function OID 1740
takes an int4 and returns a numer
runc, i.e.:
SELECT date_trunc('month',date) AS yearmonth...
I think it'll still realise it can use indexes (if they're appropriate)
that way.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.
at the ELSE clause is executed when the expression evaluates to
either NULL or FALSE, but because COUNT never returns a NULL value it
doesn't matter here. It's also possible to have multiple WHEN clauses.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To
floating point numbers will increase their
errors.
> i view the problem solved for 98% of problems.
Floating point math is good for most problems, hence why most languages
expose the abstraction.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make chan
0.00
Which looks reasonable. Remember that floating point numbers store
their state in base two, not base ten. All of those numbers look good
to 15 decimal digits.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
htt
On Wed, May 14, 2008 at 02:08:47PM -0400, Justin wrote:
> Sam Mason wrote:
> >What does foxpro use for storing numbers? or is it just that you never
> >pushed it hard enough for the abstractions to show through.
>
> I know i pushed it. Foxpro for the most has onl
s where new data can be
written. If the FSM is too small then PG will grow the table even
though there is free space in the table (because it doesn't know it
exists). VACUUM will normally give error messages about the FSM map
being too small, that and the fact that you didn't mentione
On Mon, May 19, 2008 at 06:21:18PM +0100, Sam Mason wrote:
> for t in foo bar baz
> do ( while echo "VACUUM $t;" && false ; do true ; done | psql ) &
> done
oops, that "&& false" shouldn't be there! like like this:
for t in foo bar
d guess the OP doesn't want the sub-query, if he posted the error
message we'd know for sure. I'd guess something like:
update table set date=(year||'-'||month||'-'||day||'01:00:00')::date;
If the "date" column really is of date type, the
ve my immediate
problem, but if anyone has any better solutions that would be great.
I'm assuming the arrays that int_array_aggregate() returns aren't ever
getting released. Memory usage goes to a few gigs (it's a 32bit build)
before bombing out.
Thanks,
Sam
[1] http://w
idental. The main reason I'd do this
is because it's solving a different problem, that of providing global
defaults vs. table specific defaults.
I'm not sure how you'd get all the types to match up, but then again
this whole scheme of providing defaults seems a little alien to an
ning within a system are running on
top of the cache they don't know or care whether the cache actually
matches up to the disk.
Therefore, if I understand things correctly, the state of fsync
shouldn't matter in this use case. It's equally borken independent to
the state of fsy
ed off, once this is running you
can then run 8.3's version of pg_dump against it, then you can restore
this dump into the new version of PG.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
umpall in /usr/bin/.
pgdumpall (and pgdump by default) will produce output in SQL format.
Restoring is just a simple matter of:
psql dbname -f pg814data.sql
Hope that helps!
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://
On Wed, Jun 18, 2008 at 02:17:00PM -0400, Greg Smith wrote:
> On Wed, 18 Jun 2008, Sam Mason wrote:
>
> >Isn't fsync only a side-effect of having a write-back cache between
> >programs and the disk? This means it's only purpose is to ensure that
> >the cache
;s buffer cache. To summarize, fsync
can be turned off when the user is unconcerned with power loss and when
backups are always performed at the filesystem level.
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
AVING COUNT(*) > 1;
Sam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Tue, Jun 24, 2008 at 11:13:14PM -0500, Marcelo Martins wrote:
> is there a way to find out / calculate / estimate how big a pg_dump
> using plain text format for a DB will be ?
How about simply doing:
pg_dump | wc -c
Sam
--
Sent via pgsql-general mailing list (pgsql-g
same order each time.
Another thing you can get PG to do would be a constraint like:
CHECK (time = date_trunc('minute',time))
this would ensure that you get at-most one entry per minute and that
it's on the minute. This sort of thing should make some sorts of
queries easier.
-
ious versions[2] have been
posted to this list for older versions).
--
Sam http://samason.me.uk/
[1]
http://www.postgresql.org/docs/current/static/functions-xml.html#FUNCTIONS-XML-PROCESSING
[2]
http://archives.postgresql.org/message-id/b88c3460905290021o6870bb46tec88ced0c4064...@mail.gma
r code, or even do
the parsing from XML to something more structured outside PG.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
out its support for arrays.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
You need to take care of only one case here: denominator == 0; rest of the
> cases will be handled sanely by the database.
>
> CASE WHEN packet_size = 0 THEN null ELSE cost/packet_size END as unit_cost
Yes; or even shorter:
cost/nullif(packet_size,0) AS unit_cost
--
Sam htt
On Thu, Jun 04, 2009 at 09:48:17AM -0400, Tom Lane wrote:
> Sam Mason writes:
> > If it's an SQL function and marked as IMMUTABLE it should (I believe
> > anyway) get inlined somewhere along the line and take no more overhead
> > than writing it out in full.
>
&g
replace "WHERE fn_i" with "WHERE
fn_v". I read this as it not inlining where I'd expect it to be, or am
I missing something else?
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Thu, Jun 04, 2009 at 11:17:39AM -0400, Tom Lane wrote:
> Sam Mason writes:
> > I think that with 8.3 at least I'm going to carry on putting
> > IMMUTABLE on where I think it should be. Consider:
>
> there are corner cases where it's useful to have the function
$ LANGUAGE sql STABLE;
Why not use the to_char function[1]:
SELECT to_char($1,'MMDD');
This is better because TEXT(dateval) doesn't have to give a string back
in the form -MM-DD, it just does by default. Readability also seems
to improve when using to_char.
--
S
#x27;^[0-9]+'),7);
If this is so that you can sort things based on their numeric order, why
not just convert it to an integer rather than doing any padding?
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscri
unctions like
this get added with each major version. Most useful docs for you are
in:
http://www.postgresql.org/docs/current/static/functions-string.html
You can get to older releases quickly by replacing "current" with things
like "8.2" and "7.4".
--
Sam http:/
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
sam=> SELECT substring('1a','^[0-9]+');
substring
---
1
(1 row)
sam=>
--
Sam http://samason.
..) and the other for
the actual measurement.
Just had a quick flick through your previous posts; and I'd probably
stick with the multiple tables approach. It's the most natural fit to
relational databases and until you know more about the problem (i.e.
you've experienced the data your
e decisions
wouldn't be as forced as you're making it. Design is about picking and
choosing between compromises and without knowing what the choices are
you can't design anything, this is one of the problems with tests.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hi,
Can anyone explain to me why my system is spawn so many postgress instances?
System: FreeBSD 7.2 Stable I386
RAM: < 1GB
Here is the output of the top command:
Mem: 457M Active, 92M Inact, 150M Wired, 23M Cache, 85M Buf, 18M Free
Swap: 999M Total, 150M Used, 849M Free, 14% Inuse
Here is a lis
You may get better results with increasing
the statistics target[1] for those columns as that will give PG more
information, but if the columns are indeed correlated then that's not
going to help.
--
Sam http://samason.me.uk/
[1] http://www.postgresql.org/docs/current/static/sql-alter
probably want to probably want
to do the following when creating the index:
> CREATE INDEX users_nick_index ON users (nickname varchar_pattern_ops);
That will allow PG to use the index in LIKE expressions. For more
details see:
http://www.postgresql.org/docs/current/static/indexes-opclass.ht
I copied the sample config file to postgresql workign directory before
trying to start postgresql:
# pwd
/usr/local/share/postgresql
twp1:postgresql # cp postgresql.conf.sample ../../pgsql/data/postgresql.conf
On Fri, Jun 26, 2009 at 4:04 PM, Sam Wun wrote:
> Hi,
>
> I had been running p
Hi,
I had been running postgresql 8.3.7 in freebsd for some time, but
after I changed its postgresql.conf file, it can't start any more
eventhoguh I changed the config back to its original file.
Anything wrong?
Here is the errros:
Jun 26 15:58:52 twp1 postgres[1394]: [1-1] FATAL: could not crea
T *
FROM a LEFT JOIN b ON a.id = b.id AND (b.id IS NULL OR a.c <> b.d)
and I can't think of any other formulations after reading the link you
gave---it only seems to talk about binary operators involving columns
from two tables. Second shouldn't be allowed, but I included
quot;share" locks
(multiple transactions can have a share lock on any table or row) and
"update" locks (this locks out share and other update locks).
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscri
FROM from_t f LEFT JOIN to_t t ON f.num = t.num
WHERE f.num > 2
AND t.num IS NULL;
The SELECT DISTINCT part tells the database to only return distinct
values from the query. The LEFT JOIN tells the database to filter out
anything that already exists in the "to_t" table.
--
you're using unusual bounds on your
array.
Bah, the semantics of arrays in PG always seem over-complicated to me!
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
<> [test for empty array?]
Something like the following should do the right thing:
SELECT x FROM (
SELECT xpath('//entry[contains(p, ''searchtext'')]/@*', docxml) AS x
FROM docs) AS y
WHERE array_upper(x, 1) > 0;
--
Sam http://samas
ld run pg_dump on another host,
or do something like:
pg_dump mydb | gzip | ssh otherbox "cat > out.sql.gz"
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
ifferent priority becomes a distinct
> tuple.
I think you just want to swap the ORDER BY columns around; i.e:
ORDER BY part_number, priority
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
identifier you specified.
BTW, if you're concerned about insert performance then the less indexes
you have the better.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Sun, Jul 19, 2009 at 02:56:04PM +0200, Andreas Kretschmer wrote:
> Sam Mason wrote:
> > The problem with just having an index on either column is that it's
> > difficult to combine them and PG hence just thinks that it will be
>
> Since 8.1 PG can do an bitmap ind
casting and forcing users to
explicitly say that this is what they want.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
not had to solve a hard
problem here.
> (3) Give input to me so that I can write a good tutorial to post on
>the postgres site?
There's already a page on the postgres wiki about this[3], maybe
something needs clarifying?
--
Sam http://samason.me.uk/
[1] http:/
ng
for every table and almost certainly not just blindly doing it on the
table's primary key.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
\xBF]{3}|$$|| -- planes 4-15
$$\xF4[\x80-\x8F][\x80-\xBF]{2}$$|| -- plane 16
'*)$' );
This seems to do the right thing for me in an SQL_ASCII database.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
NCTION array_index(anyarray,int)
RETURNS anyelement IMMUTABLE
LANGUAGE sql AS $$
SELECT $1[$2]; $$;
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Tue, Jul 21, 2009 at 02:29:12PM -0400, Merlin Moncure wrote:
> On Tue, Jul 21, 2009 at 10:47 AM, Sam Mason wrote:
> > On Tue, Jul 21, 2009 at 04:08:51PM +0600, Murat Kabilov wrote:
> >> I would like to know if there is a function that extracts an element by its
> &
that the id column in those tables uniquely identify the rows in the
table? This isn't going to make it slow, but will cause you to get a
non-deterministic (i.e. normally "wrong") answer.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgre
enerating CSV files and hence will
probably be easier to get correct.
--
Sam http://samason.me.uk/
[1] http://www.postgresql.org/docs/current/static/sql-copy.html
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
ike this be more amenable to optimization:
CREATE FUNCTION tbl_auditor() RETURNS BOOLEAN IMMUTABLE AS $$
logquery;
RETURN TRUE; $$;
CREATE VIEW tbl_view AS
SELECT * FROM tbl WHERE tbl_auditor();
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-g
at least that's what looks strange to me now--not sure how it got moved
though!
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
oblems displaying million character
> lines,
>
> I expect ther big guns "vim" and "emacs" also have no problems with
> long lines.
GNU Emacs is fine; just tried with a line consisting of a million copies
of "helloworld " and it was a bit slow with som
orks then you've got the option of dumping the old data
that was stashed away above and update the config file to point straight
to the new location.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscripti
cks#Attention_on_IS_NULL_and_IS_NOT_NULL_operators_for_composite_types
is scary; even worse is that it was changed to be like this in 8.2
because the standard says it should behave this way. What on earth were
they thinking when they defined the standard this way?
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing l
usly for large files (i.e. a GB
and over) it's not going to work, but I'd still expect tools to work
("less -n" seems to be my tool of choice at the moment).
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make chan
atly only foreign key constraints are affected by this setting,
but I believe there are plans to extend this further.
--
Sam http://samason.me.uk/
http://www.postgresql.org/docs/current/static/sql-set-constraints.html
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To ma
ave to run the query twice?
Wouldn't that be a temporary table?
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
uments; python
makes this sort of thing reasonably easy if you want to stay reasonably
low level or there are lots of frameworks around to simplify things.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subs
s a "fold" from normal functional
programming. The Wikipedia page is a reasonable description:
http://en.wikipedia.org/wiki/Fold_(higher-order_function)
Not sure how helpful that is though!
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@post
sers u, users_locations l
WHERE u.id= l.user_id
AND u.birthday <= l.created
ORDER BY u.id, l.created
Untested, but hopefully gives enough hints about where to look!
--
Sam http://samason.me.uk/
[1] http://www.postgresql.org/docs/current/static/sql-select.html#SQL-DISTINCT
--
instance, there are 10 bags each weighing 5 lbs, and
> you want SUM(weight) - you need to project weight onto a collection which
> allows for 10 occurences, or define the aggregate function to work on the
> whole tuple somehow... I know a man named Krug worked out a formal theory
> for this...
On Tue, Jul 28, 2009 at 11:26:01AM -0400, Robert James wrote:
> On Tue, Jul 28, 2009 at 9:47 AM, Sam Mason wrote:
> > On Tue, Jul 28, 2009 at 09:14:38AM -0400, Robert James wrote:
> > > Many wrote that the functional programming 'fold' is a good model for
> > &g
On Wed, Jul 29, 2009 at 01:15:27PM +, Jasen Betts wrote:
> On 2009-07-23, Sam Mason wrote:
> >
> > http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks#Attention_on_IS_NULL_and_IS_NOT_NULL_operators_for_composite_types
> >
> > is scary; even worse is that it
ng
to test the client connections every once in a while to see if they're
still valid.
The postmaster seems like a reasonable place to do this to me, it has
all the descriptors it just discards them at the moment.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing
e bytea value
out into the filesystem.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Thu, Jul 30, 2009 at 03:09:12PM +0200, Radek Novotnnn wrote:
> Is there possible to create pg trigger that runs shell script?
Yes, pl/perl can do this.
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to y
ot;pNOME" varchar, "pNOME_ABREV" varchar,
[..]
> VALUES ( pID_SOCIEDADE,
You're mixing and matching quoting of identifiers, sometimes you use
"pID_SOCIEDADE" and other times just pID_SOCIEDADE (i.e. without the
quotes) and these are different identifiers. You need to pick
PG, the things that will help
you are roles[1], views[2], and functions[3] with "security definer"
set.
--
Sam http://samason.me.uk/
[1] http://www.postgresql.org/docs/current/static/user-manag.html
[2] http://www.postgresql.org/docs/current/static/sql-createview.html
[3] http://www.
unction ?
Either use something like date_trunc[1], convert it to a string with
to_char[2], or create a table that contains what you consider to be your
week ranges in (i.e. year, week, startdate, enddate).
--
Sam http://samason.me.uk/
[1]
http://www.postgresql.org/docs/current/static/functi
s going to be less of an issue with division that other
operators, but it's worth bearing in mind. The "IMMUTABLE" options is a
good one to specify though, keep that!
--
Sam http://samason.me.uk/
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Sun, Aug 02, 2009 at 02:20:18PM +0200, Pavel Stehule wrote:
> 2009/8/2 Sam Mason :
> > On Sun, Aug 02, 2009 at 12:08:28PM +0100, Oliver Kohll - Mailing Lists
> > wrote:
> >> CREATE OR REPLACE FUNCTION gtpb_divide(integer, integer) RETURNS integer
> >
101 - 200 of 812 matches
Mail list logo