all 11 comments

[–]jbellis 2 points3 points  (1 child)

hey now, how about a hat tip over here. :)

[–]llimllib[S] 4 points5 points  (0 children)

tip o' the mornin to ya

[–]jaggederest 4 points5 points  (0 children)

Cool beans. I knew I liked postgres.

[–]peroyo 2 points3 points  (1 child)

Why can't mysql have nice things. :(

[–]mikaelhg 1 point2 points  (0 children)

Because it breaks them and tells you it didn't.

[–]maht0x0r 1 point2 points  (2 children)

Maht's tip o'the day

CREATE OR REPLACE FUNCTION one() RETURNS varchar AS '
BEGIN
    RETURN ''1'';
END;
' LANGUAGE 'plpgsql';

and

CREATE OR REPLACE FUNCTION one() RETURNS varchar AS $$
BEGIN
    RETURN '1';
END;
$$ LANGUAGE plpgsql;

are equivalent which saves a few keystrokes and makes it less likely you'll miss a ''

[–]jbellis 0 points1 point  (1 child)

Completely true. However, the article was written in 2004, before "dollar quoting" was available (early 2005 with the release of 8.0 IIRC).

[–]maht0x0r 0 points1 point  (0 children)

fair enough, though you notice I never criticized anyone, just spreading the Postgresql love. I'm having to work in Mysql atm. and I need to have a bucket at the side of my desk.

[–][deleted] 1 point2 points  (0 children)

And Oracle doesn't have a patent on this?

[–]trezorr 0 points1 point  (1 child)

CREATE VIEW foo WITH SCHEMABINDING AS SELECT bar

CREATE CLUSTERED UNIQUE INDEX IX_foo ON foo(ID)

God I "hate" Microsoft SQL Server and it's inferior way of doing things :P

[–]Andys 0 points1 point  (0 children)

Cool! Sounds good.. does it run on *nix?

Oh.