On 2011-06-10, Emi Lu em...@encs.concordia.ca wrote:
Good morning,
String array compare command, I forgot how to do it.
E.g.,
create table z_drop(id varchar[]);
insert into z_drop values('{a1, a2, b1, b2, b3}');
I'd like to do:
select * from z_drop where id = any('a1', 'b1');
use the
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 Sat, 2011-06-11 at 17:01 +0200, Leif Biberg Kristensen wrote:
Can anybody tell me why this doesn't work?
Because it's not supported. The START clause expects a value, not a
subquery.
pgslekt= CREATE SEQUENCE sources_source_id_seq START WITH (SELECT
MAX(source_id) FROM sources);
ERROR:
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) FROM sources);
ERROR: syntax error at or near (
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 (
LINE 1: CREATE SEQUENCE sources_source_id_seq START WITH (SELECT
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
http://www.postgresql.org/docs/8.4/interactive/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING
CREATE OR REPLACE FUNCTION public.next_bill_date(d date, period
interval,
i interval)
RETURNS SETOF date
AS $function$
DECLARE
max_date date;
due_date date;
BEGIN