Re: MS SQL Server compatibility functions - Mailing list pgsql-hackers

From Mario Weilguni
Subject Re: MS SQL Server compatibility functions
Date
Msg-id 200511241037.45172.mweilguni@sime.com
Whole thread Raw
In response to Re: MS SQL Server compatibility functions  ("Pollard, Mike" <mpollard@cincom.com>)
Responses Re: MS SQL Server compatibility functions  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List 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


pgsql-hackers by date:

Previous
From: Fredrik Olsson
Date:
Subject: Re: MS SQL Server compatibility functions
Next
From: Simon Riggs
Date:
Subject: Re: [BUGS] BUG #2052: Federal Agency Tech Hub Refuses to Accept