Re: MS SQL Server compatibility functions

From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Pollard, Mike" <mpollard(at)cincom(dot)com>, "Bill Bartlett" <bbartlett(at)softwareanalytics(dot)com>, "Fredrik Olsson" <fredrik(dot)olsson(at)treyst(dot)se>
Subject: Re: MS SQL Server compatibility functions
Date: 2005-11-24 09:37:45
Message-ID: 200511241037.45172.mweilguni@sime.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Am Mittwoch, 23. November 2005 16:32 schrieb Pollard, Mike:
> If this gets added as a contrib, here's a version of uniqueidentifier
> and newid() I wrote that maintains the same format as the SQL Server
> version:
>
> CREATE SCHEMA sqlserver
> AUTHORIZATION postgres;
> GRANT ALL ON SCHEMA sqlserver TO public;
>
> CREATE SEQUENCE sqlserver.uniqueidentifier0
> INCREMENT 1
> MINVALUE 0
> MAXVALUE 9223372036854775807
> START 0
> CACHE 1;
> GRANT ALL ON TABLE sqlserver.uniqueidentifier0 TO public;
>
> CREATE SEQUENCE sqlserver.uniqueidentifier1
> INCREMENT 1
> MINVALUE 0
> MAXVALUE 9223372036854775807
> START 0
> CACHE 1;
> GRANT ALL ON TABLE sqlserver.uniqueidentifier1 TO public;

Why do you use "GRANT ALL" and not "GRANT SELECT, UPDATE"? All means everybody
can do bad things with those sequences.

Regards,
Mario Weilguni

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2005-11-24 10:13:14 Re: BUG #2052: Federal Agency Tech Hub Refuses to Accept
Previous Message Fredrik Olsson 2005-11-24 08:10:44 Re: MS SQL Server compatibility functions