Tirsdag 15. januar 2013 12.50.00 skrev Barbara Woolums :
I am running a query like so
SELECT id FROM image WHERE image='demo-harvey wallbanger.jpg'
It returns nothing
My table looks like this
demo-820.jpg;1
demo-lemon-mousse-1.jpg;2
demo-pumpkinchaibars.jpg;3
demo-Lolly-Shop.jpg;4
Tirsdag 28. februar 2012 12.56.46 skrev Rehan Saleem :
hi ,
whats wrong with this function , i am getting syntax error which is syntax
error at or near += LINE 13: set sql += ' bpoverlap, centredistance
You can't concatenate that way in plpgsql. Instead of set sql += try with
just || which
Fredag 30. desember 2011 09.43.38 skrev Jan Bakuwel :
Would be nice to have an option in PostgreSQL something along the lines
of: 'abort-transaction-on-constraint-violation = false'
That option is called MySQL with MyISAM tables.
Seriously, if the user encounters a constraint violation,
Fredag 30. desember 2011 05.25.22 skrev Jan Bakuwel :
Of course I can start testing existing values in the database before
accepting them in the user interface but that's putting the horse behind
the cart. I much rather use the constraints at the database level to
tell me a particular update
I'm trying to write a sql or plpgsql function update_nametags(TEXT, TEXT)
which does a replace on this form:
UPDATE sources SET source_text = regexp_replace(source_text,
E'n=(.*?)$1(.*?)', E'n=\\1$2\\2', 'g') where source_text like
'%n=%$2%%';
But I can't find out how to escape the parameters
On Saturday 17. September 2011 13.21.43 Leif Biberg Kristensen wrote:
UPDATE sources SET source_text = regexp_replace(source_text,
E'n=(.*?)$1(.*?)', E'n=\\1$2\\2', 'g') where source_text like
'%n=%$2%%';
Sorry, I pasted a literal replacement, and substituted the parameters by hand
On Saturday 17. September 2011 19.07.03 Tim Landscheidt wrote:
Leif Biberg Kristensen l...@solumslekt.org wrote:
UPDATE sources SET source_text = regexp_replace(source_text,
E'n=(.*?)$1(.*?)', E'n=\\1$2\\2', 'g') where source_text like
'%n=%$1%%'
Try:
UPDATE sources SET source_text
On Thursday 1. September 2011 11.16.23 Scott Marlowe wrote:
The postgresql type text is a varchar with
no precision that can hold up to about a gig or so of text. Not that
i recommend putting a gig of text into a single field in a database.
Printed out as plain text on paper with 4,000
On Saturday 11. June 2011 22.09.09 Leif Biberg Kristensen wrote:
I've written a blog post which I hope may be helpful to others in a similar
situation:
http://solumslekt.org/blog/?p=321
Thanks to Guillaume Lelarge, Tom Lane, and Andreas Kretschmer. You guys are
great.
And even better
Can anybody tell me why this doesn't work?
pgslekt= CREATE SEQUENCE sources_source_id_seq START WITH (SELECT
MAX(source_id) FROM sources);
ERROR: syntax error at or near (
LINE 1: CREATE SEQUENCE sources_source_id_seq START WITH (SELECT MAX...
On Saturday 11. June 2011 17.14.21 Tom Lane wrote:
Guillaume Lelarge guilla...@lelarge.info writes:
On Sat, 2011-06-11 at 17:01 +0200, Leif Biberg Kristensen wrote:
Can anybody tell me why this doesn't work?
pgslekt= CREATE SEQUENCE sources_source_id_seq START WITH (SELECT
MAX(source_id
On Saturday 11. June 2011 17.23.40 Andreas Kretschmer wrote:
Leif Biberg Kristensen l...@solumslekt.org wrote:
Can anybody tell me why this doesn't work?
pgslekt= CREATE SEQUENCE sources_source_id_seq START WITH (SELECT
MAX(source_id) FROM sources);
ERROR: syntax error at or near
I've written a blog post which I hope may be helpful to others in a similar
situation:
http://solumslekt.org/blog/?p=321
Thanks to Guillaume Lelarge, Tom Lane, and Andreas Kretschmer. You guys are
great.
regards, Leif
http://code.google.com/p/yggdrasil-genealogy/
--
Sent via pgsql-sql
On Wednesday 11 May 2011 22:29:40 Tony Capobianco wrote:
We are converting from Oracle to Postgres. An Oracle script contains
this line:
select replace(firstname,''), memberid, emailaddress from members;
in an effort to replace the with nothing. How can I achieve the same
result with
On Wednesday 11 May 2011 23:25:34 Ross J. Reedstrom wrote:
On Wed, May 11, 2011 at 11:11:07PM +0200, Leif Biberg Kristensen wrote:
although it's a little above me why you would want to select firstname in
the first place when you proceed to replace it with nothing.
Nah, he's replacing
On Tuesday 8. February 2011 19.14.00 Tarlika Elisabeth Schmitz wrote:
From the date and time I want to create a timestamp.
I know that
- the events take place during the day, say between 10:30 and 22:30
- it's always a set of events at one location spaced about 30min apart
- the imported
, removing comments hidden within curly braces like
this:
str := REGEXP_REPLACE(str, '{.*?}', '', 'g');
No escaping needed at all.
regards,
Leif Biberg Kristensen
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org
with a foreign key
referencing the id of the former. The number of wheels is obviously an
attribute of models.
regards,
--
Leif Biberg Kristensen
http://solumslekt.org/blog/
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http
can even cast it to an integer on the fly:
SELECT (REGEXP_MATCHES(bar, E'(\\d+)'))[1]::INTEGER FROM foo;
Or as a more general case, whatever's inside (the first) set of parentheses:
SELECT (REGEXP_MATCHES(bar, E'\\((.+?)\\)'))[1] FROM foo;
regards,
--
Leif Biberg Kristensen
http
Klyve vestre i Solum 07.07.1784:
[p=6947|Isach Jonsen].
(1 row)
What am I missing?
regards,
--
Leif Biberg Kristensen
http://solumslekt.org/
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
On Tuesday 27. April 2010 15.04.23 Tim Landscheidt wrote:
Leif Biberg Kristensen l...@solumslekt.org wrote:
[...]
So far, so good. But when I try to do the actual expansion, I'm stumped.
pgslekt= select regexp_replace((select source_text from sources where
source_id=23091), (select
On Tuesday 27. April 2010 13.43.48 Leif Biberg Kristensen wrote:
CREATE TABLE short_links (
link_type CHAR(2) PRIMARY KEY,
short_link TEXT,
long_link TEXT,
description TEXT
);
It appears like I have to double the number of backslashes when I enter the
data:
INSERT
:= REGEXP_REPLACE(str, links.short_link, links.long_link, 'g');
END LOOP;
RETURN str;
END
$$ LANGUAGE plpgsql IMMUTABLE;
By the way, those who haven't read this gem should probably do so:
http://database-programmer.blogspot.com/2008/05/minimize-code-maximize-
data.html
regards,
--
Leif Biberg
of a family tree? Old Adam Eve?
On the other hand, a pedigree may be considered a true binary tree with a root
node, the proband.
regards,
--
Leif Biberg Kristensen
http://solumslekt.org/
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http
On Monday 12. April 2010 17.37.58 Yeb Havinga wrote:
Leif Biberg Kristensen wrote:
On Monday 12. April 2010 16.57.38 Rob Sargent wrote:
Believe me: ego-ma-pa will correctly define genealogical relationships
(at least among humans).
Yes, but a family tree
On Thursday 25. March 2010 16.16.53 Leif Biberg Kristensen wrote:
I'm struggling with how to make plpgsql iterate through a list of numbers
input as a text string, eg. 1438 2656 973 4208. I figure that I can use the
regexp_split_to_array() function to make an array of the string, but can I
Biberg Kristensen
http://solumslekt.org/
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
participants, not the
primary tables persons and events.
--
Leif Biberg Kristensen
http://solumslekt.org
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
beyond maybe a few thousand rows.
--
Leif Biberg Kristensen
http://solumslekt.org
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
On Wednesday 4. November 2009 19.37.41 Scott Marlowe wrote:
On Wed, Nov 4, 2009 at 11:36 AM, Leif Biberg Kristensen
l...@solumslekt.org wrote:
I'd missed that particular syntax.
This table is now without a primary key, but is that a problem? I don't
expect it to grow beyond maybe a few
On Wednesday 4. November 2009 21.03.26 Scott Marlowe wrote:
On Wed, Nov 4, 2009 at 11:53 AM, Leif Biberg Kristensen
This looks strange to me, but it works:
pgslekt= CREATE TABLE participant_notes (
pgslekt( person_fk INTEGER NOT NULL,
pgslekt( event_fkINTEGER NOT NULL
31 matches
Mail list logo