pdf viewer dll for c# : Add image pdf SDK control API wpf web page azure sharepoint postgresql-9.4-A4140-part2769

CREATE CAST
Name
CREATE CAST—defineanewcast
Synopsis
CREATE CAST (
source_type
AS
target_type
)
WITH FUNCTION
function_name
(
argument_type
[, ...])
[ AS ASSIGNMENT | AS IMPLICIT ]
CREATE CAST (
source_type
AS
target_type
)
WITHOUT FUNCTION
[ AS ASSIGNMENT | AS IMPLICIT ]
CREATE CAST (
source_type
AS
target_type
)
WITH INOUT
[ AS ASSIGNMENT | AS IMPLICIT ]
Description
CREATE CAST
defines anewcast.Acastspecifies howtoperformaconversionbetweentwodata
types.Forexample,
SELECT CAST(42 AS float8);
convertstheintegerconstant42totype
float8
byinvokingapreviouslyspecifiedfunction,inthis
case
float8(int4)
.(Ifnosuitablecasthasbeendefined,theconversionfails.)
Twotypescanbebinarycoercible,whichmeansthattheconversioncanbeperformed“forfree”with-
outinvokinganyfunction.Thisrequiresthatcorrespondingvaluesusethesameinternalrepresenta-
tion.Forinstance,thetypes
text
and
varchar
arebinarycoerciblebothways.Binarycoercibilityis
notnecessarilyasymmetricrelationship.Forexample,thecastfrom
xml
to
text
canbeperformed
forfreeinthepresentimplementation,butthereversedirectionrequires afunctionthatperforms at
leasta syntaxcheck.(Twotypesthat arebinarycoerciblebothways arealsoreferredto asbinary
compatible.)
YoucandefineacastasanI/Oconversioncastbyusingthe
WITH INOUT
syntax.AnI/Oconversion
castisperformedbyinvokingtheoutputfunctionofthesourcedatatype,andpassingtheresulting
stringtothe input functionofthe targetdatatype.Inmanycommoncases,this featureavoids the
need to write a separate cast function for conversion. AnI/Oconversion cast acts the same as a
regularfunction-basedcast;onlytheimplementationisdifferent.
By default,a castcan be invoked onlyby anexplicit castrequest,that is an explicit
CAST(
x
AS
typename
)
or
x::typename
construct.
Ifthecastismarked
AS ASSIGNMENT
thenitcanbeinvokedimplicitlywhenassigningavaluetoa
columnofthetargetdatatype.Forexample,supposingthat
foo.f1
isacolumnoftype
text
,then:
INSERT INTO foo (f1) VALUES (42);
1328
Add image pdf - insert images into PDF in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Sample C# code to add image, picture, logo or digital photo into PDF document page using PDF page editor control
add image in pdf using java; add image to pdf java
Add image pdf - VB.NET PDF insert image library: insert images into PDF in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Guide VB.NET Programmers How to Add Images in PDF Document
add jpg to pdf acrobat; add png to pdf acrobat
CREATECAST
willbeallowedifthecastfromtype
integer
totype
text
ismarked
AS ASSIGNMENT
,otherwise
not.(Wegenerallyusethetermassignmentcasttodescribethiskindofcast.)
Ifthecastismarked
AS IMPLICIT
thenitcanbeinvokedimplicitlyinanycontext,whetherassign-
mentorinternallyinanexpression.(Wegenerallyusethetermimplicitcasttodescribethiskindof
cast.)Forexample,considerthisquery:
SELECT 2 + 4.0;
Theparserinitiallymarkstheconstantsasbeingoftype
integer
and
numeric
respectively.Thereis
no
integer+numeric
operatorinthesystemcatalogs,butthereisa
numeric+numeric
operator.
Thequerywillthereforesucceedifacastfrom
integer
to
numeric
isavailableandismarked
AS
IMPLICIT
—whichinfactitis.Theparserwillapplytheimplicitcastandresolvethequeryasifit
hadbeenwritten
SELECT CAST ( 2 AS numeric ) + 4.0;
Now, the catalogs also provide a cast from
numeric
to
integer
. If that cast were marked
AS
IMPLICIT
—whichitisnot—thentheparserwouldbefacedwithchoosingbetweentheaboveinter-
pretationandthealternativeofcastingthe
numeric
constantto
integer
andapplyingthe
integer
+integer
operator.Lackinganyknowledgeofwhichchoicetoprefer,itwouldgiveupanddeclare
thequeryambiguous.Thefactthatonlyoneofthetwocastsisimplicitisthewayinwhichweteach
theparsertopreferresolutionofamixed
numeric
-and-
integer
expressionas
numeric
;thereisno
built-inknowledgeaboutthat.
Itis wise tobeconservativeaboutmarkingcasts asimplicit.Anoverabundance ofimplicitcasting
paths cancause PostgreSQL tochoose surprising interpretations ofcommands, ortobe unable to
resolvecommandsatallbecausetherearemultiplepossibleinterpretations.Agoodruleofthumbis
tomakeacastimplicitlyinvokableonlyforinformation-preservingtransformationsbetweentypesin
thesamegeneraltypecategory.Forexample,thecastfrom
int2
to
int4
canreasonablybeimplicit,
butthecastfrom
float8
to
int4
shouldprobablybeassignment-only.Cross-type-categorycasts,
suchas
text
to
int4
,arebestmadeexplicit-only.
Note:Sometimesitisnecessaryforusabilityorstandards-compliancereasonstoprovidemultiple
implicitcastsamongasetoftypes,resultinginambiguitythatcannotbeavoidedasabove.The
parser has afallback heuristicbased on typecategories andpreferredtypes thatcan helpto
providedesiredbehaviorinsuchcases.SeeCREATETYPEformoreinformation.
Tobeabletocreateacast,youmustownthesourceorthetargetdatatypeandhave
USAGE
privilege
ontheothertype.Tocreateabinary-coerciblecast,youmustbesuperuser.(Thisrestrictionismade
becauseanerroneousbinary-coerciblecastconversioncaneasilycrashtheserver.)
Parameters
source_type
Thenameofthesourcedatatypeofthecast.
target_type
Thenameofthetargetdatatypeofthecast.
1329
C# PDF Image Extract Library: Select, copy, paste PDF images in C#
Get image information, such as its location, zonal information, metadata, and so on. Able to edit, add, delete, move, and output PDF document image.
add an image to a pdf; how to add picture to pdf
VB.NET PDF Image Extract Library: Select, copy, paste PDF images
DLLs for PDF Image Extraction in VB.NET. In order to run the sample code, the following steps would be necessary. Add necessary references:
attach image to pdf form; add image pdf
CREATECAST
function_name
(
argument_type
[,...])
Thefunctionusedtoperformthecast.Thefunctionnamecanbeschema-qualified.Ifitisnot,
thefunctionwillbelookedupintheschemasearchpath.Thefunction’sresultdatatypemust
matchthetargettypeofthecast.Itsargumentsarediscussedbelow.
WITHOUT FUNCTION
Indicatesthatthesourcetypeisbinary-coercibletothetargettype,sonofunctionisrequiredto
performthecast.
WITH INOUT
Indicatesthatthecastis anI/Oconversioncast,performedbyinvokingtheoutputfunctionof
thesourcedatatype,andpassingtheresultingstringtotheinputfunctionofthetargetdatatype.
AS ASSIGNMENT
Indicatesthatthecastcanbeinvokedimplicitlyinassignmentcontexts.
AS IMPLICIT
Indicatesthatthecastcanbeinvokedimplicitlyinanycontext.
Cast implementationfunctions can have one to three arguments.Thefirst argument type must be
identicaltoorbinary-coerciblefromthecast’ssourcetype.Thesecondargument,ifpresent,mustbe
type
integer
;itreceivesthetypemodifierassociatedwiththedestinationtype,or
-1
ifthereisnone.
Thethirdargument,ifpresent,mustbetype
boolean
;itreceives
true
ifthecastisanexplicitcast,
false
otherwise.(Bizarrely,theSQLstandarddemandsdifferentbehaviorsforexplicitandimplicit
castsinsomecases.Thisargumentissuppliedforfunctionsthatmustimplementsuchcasts.Itisnot
recommendedthatyoudesignyourowndatatypessothatthismatters.)
Thereturntypeofacastfunctionmustbeidenticaltoorbinary-coercibletothecast’stargettype.
Ordinarilyacastmusthavedifferentsourceandtargetdatatypes.However,itisallowedtodeclare
acastwithidenticalsourceandtargettypes ifithas acastimplementationfunctionwithmorethan
oneargument.Thisisusedtorepresenttype-specificlengthcoercionfunctionsinthesystemcatalogs.
Thenamedfunctionisusedtocoerceavalueofthetypetothetypemodifiervaluegivenbyitssecond
argument.
Whenacasthasdifferentsourceandtargettypesandafunctionthattakesmorethanoneargument,
itsupportsconvertingfromonetypetoanotherandapplyingalengthcoercioninasinglestep.When
nosuchentryisavailable,coerciontoatypethatusesatypemodifierinvolvestwocaststeps,oneto
convertbetweendatatypesandasecondtoapplythemodifier.
Acasttoorfromadomaintypecurrentlyhasnoeffect.Castingtoorfromadomainusesthecasts
associatedwithitsunderlyingtype.
Notes
UseDROPCASTtoremoveuser-definedcasts.
Rememberthatifyouwanttobeabletoconverttypesbothwaysyouneedtodeclarecastsbothways
explicitly.
Itisnormallynotnecessarytocreatecastsbetweenuser-definedtypesandthestandardstringtypes
(
text
,
varchar
,and
char(
n
)
,as wellas user-defined types that are definedto be in the string
category).PostgreSQLprovidesautomaticI/Oconversioncastsforthat.Theautomaticcaststostring
types aretreatedasassignmentcasts,while theautomaticcastsfromstringtypesareexplicit-only.
Youcanoverridethisbehaviorbydeclaringyourowncasttoreplaceanautomaticcast,butusually
1330
VB.NET PDF Password Library: add, remove, edit PDF file password
VB: Add Password to PDF with Permission Settings Applied. This VB.NET example shows how to add PDF file password with access permission setting.
adding images to a pdf document; add photo to pdf form
C# PDF Password Library: add, remove, edit PDF file password in C#
C# Sample Code: Add Password to PDF with Permission Settings Applied in C#.NET. This example shows how to add PDF file password with access permission setting.
add image pdf acrobat; add photo to pdf in preview
CREATECAST
theonlyreasontodosoisifyouwanttheconversiontobemoreeasilyinvokablethanthestandard
assignment-onlyorexplicit-onlysetting.Anotherpossiblereasonisthatyouwanttheconversionto
behavedifferentlyfromthetype’sI/Ofunction;butthatissufficientlysurprisingthatyoushouldthink
twiceaboutwhetherit’sagoodidea.(Asmallnumberofthebuilt-intypesdoindeedhavedifferent
behaviorsforconversions,mostlybecauseofrequirementsoftheSQLstandard.)
While notrequired,it is recommended thatyou continueto follow this oldconventionofnaming
cast implementationfunctionsafterthe targetdatatype.Manyusers areusedtobeingable tocast
datatypesusingafunction-stylenotation,thatis
typename
(
x
).Thisnotationisinfactnothingmore
norlessthanacallofthecastimplementationfunction;itisnotspeciallytreatedasacast.Ifyour
conversion functions are notnamedtosupport this conventionthenyou willhavesurprisedusers.
SincePostgreSQLallowsoverloadingofthesamefunctionnamewithdifferentargumenttypes,there
is nodifficultyinhavingmultiple conversionfunctionsfromdifferenttypes that all use the target
type’sname.
Note:Actuallytheprecedingparagraphisanoversimplification:therearetwocasesinwhicha
function-callconstructwillbe treatedas acastrequestwithouthavingmatchedittoanactual
function.Ifafunctioncall
name
(
x
)doesnotexactlymatchany existingfunction,but
name
isthe
name of adata typeand
pg_cast
provides a binary-coerciblecastto this type from thetype
of
x
,thenthecallwillbeconstruedasabinary-coerciblecast.This exceptionis madesothat
binary-coerciblecastscanbeinvokedusingfunctionalsyntax,eventhoughtheylackanyfunction.
Likewise,ifthereisno
pg_cast
entrybutthecastwouldbetoorfromastringtype,thecallwill
beconstruedasanI/Oconversioncast.ThisexceptionallowsI/Oconversioncaststobeinvoked
usingfunctionalsyntax.
Note:Thereisalso anexceptiontotheexception:I/Oconversion casts fromcomposite types
to stringtypes cannotbeinvoked usingfunctional syntax, butmust be written in explicitcast
syntax(either
CAST
or
::
notation).Thisexceptionwasaddedbecauseaftertheintroductionof
automatically-providedI/Oconversioncasts,itwasfoundtooeasytoaccidentallyinvokesucha
castwhenafunctionorcolumnreferencewasintended.
Examples
Tocreateanassignmentcastfromtype
bigint
totype
int4
usingthefunction
int4(bigint)
:
CREATE CAST (bigint AS int4) WITH FUNCTION int4(bigint) AS ASSIGNMENT;
(Thiscastisalreadypredefinedinthesystem.)
Compatibility
The
CREATE CAST
commandconformstotheSQLstandard,exceptthatSQLdoesnotmakeprovi-
sionsforbinary-coercibletypesorextraargumentstoimplementationfunctions.
AS IMPLICIT
isa
PostgreSQLextension,too.
1331
C# Create PDF from images Library to convert Jpeg, png images to
List<Bitmap> images = new List<Bitmap>(); images.Add(new Bitmap(Program.RootPath + "\\" 1.gif")); / Build a PDF document with GIF image.
add jpeg to pdf; adding image to pdf file
C# PDF Sticky Note Library: add, delete, update PDF note in C#.net
C#.NET PDF SDK - Add Sticky Note to PDF Page in C#.NET. Able to add notes to PDF using C# source code in Visual Studio .NET framework.
adding an image to a pdf form; add signature image to pdf acrobat
CREATECAST
See Also
CREATEFUNCTION,CREATETYPE,DROPCAST
1332
C# PDF remove image library: remove, delete images from PDF in C#.
C# Read: PDF Image Extract; C# Write: Insert text into PDF; C# Write: Add Image to PDF; Remove Image from PDF Page Using C#. Add necessary references:
add image to pdf; add picture to pdf reader
VB.NET PDF remove image library: remove, delete images from PDF in
C# Read: PDF Image Extract; C# Write: Insert text into PDF; C# Write: Add Image to PDF; VB.NET: Remove Image from PDF Page. Add necessary references:
add picture to pdf file; how to add an image to a pdf in acrobat
CREATE COLLATION
Name
CREATE COLLATION—defineanewcollation
Synopsis
CREATE COLLATION
name
(
[ LOCALE =
locale
, ]
[ LC_COLLATE =
lc_collate
, ]
[ LC_CTYPE =
lc_ctype
]
)
CREATE COLLATION
name
FROM
existing_collation
Description
CREATE COLLATION
definesanewcollationusingthespecifiedoperatingsystemlocalesettings,or
bycopyinganexistingcollation.
Tobeabletocreateacollation,youmusthave
CREATE
privilegeonthedestinationschema.
Parameters
name
Thenameofthecollation.Thecollationnamecanbeschema-qualified.Ifitisnot,thecollation
isdefinedinthecurrentschema.Thecollationnamemustbeuniquewithinthatschema.(The
systemcatalogscancontaincollationswiththesamenameforotherencodings,butthese are
ignoredifthedatabaseencodingdoesnotmatch.)
locale
Thisisashortcutforsetting
LC_COLLATE
and
LC_CTYPE
atonce.Ifyouspecifythis,youcannot
specifyeitherofthoseparameters.
lc_collate
Usethespecifiedoperatingsystemlocaleforthe
LC_COLLATE
localecategory.Thelocalemust
beapplicabletothecurrentdatabaseencoding.(SeeCREATEDATABASEforthepreciserules.)
lc_ctype
Usethespecifiedoperatingsystemlocaleforthe
LC_CTYPE
localecategory.Thelocalemustbe
applicabletothecurrentdatabaseencoding.(SeeCREATEDATABASEforthepreciserules.)
existing_collation
Thenameofanexistingcollationtocopy.Thenewcollationwillhavethesamepropertiesasthe
existingone,butitwillbeanindependentobject.
1333
CREATECOLLATION
Notes
Use
DROP COLLATION
toremoveuser-definedcollations.
SeeSection22.2formoreinformationaboutcollationsupportinPostgreSQL.
Examples
Tocreateacollationfromtheoperatingsystemlocale
fr_FR.utf8
(assumingthecurrentdatabase
encodingis
UTF8
):
CREATE COLLATION french (LOCALE = ’fr_FR.utf8’);
Tocreateacollationfromanexistingcollation:
CREATE COLLATION german FROM "de_DE";
Thiscanbeconvenienttobeabletouseoperating-system-independentcollationnames inapplica-
tions.
Compatibility
Thereisa
CREATE COLLATION
statementintheSQLstandard,butitislimitedtocopyinganexisting
collation.ThesyntaxtocreateanewcollationisaPostgreSQLextension.
See Also
ALTERCOLLATION,DROPCOLLATION
1334
CREATE CONVERSION
Name
CREATE CONVERSION—defineanewencodingconversion
Synopsis
CREATE [ DEFAULT ] CONVERSION
name
FOR
source_encoding
TO
dest_encoding
FROM
function_name
Description
CREATE CONVERSION
definesanewconversionbetweencharactersetencodings.Also,conversions
thataremarked
DEFAULT
canbeusedforautomaticencodingconversionbetweenclientandserver.
Forthispurpose,twoconversions,fromencodingAtoBandfromencodingBtoA,mustbedefined.
To be able tocreatea conversion,youmust have
EXECUTE
privilegeonthefunctionand
CREATE
privilegeonthedestinationschema.
Parameters
DEFAULT
The
DEFAULT
clause indicates that this conversionis the default forthis particularsource to
destinationencoding.Thereshouldbeonlyonedefaultencodinginaschemafortheencoding
pair.
name
Thenameoftheconversion.Theconversionnamecanbeschema-qualified.Ifitisnot,thecon-
versionisdefinedinthecurrentschema.Theconversionnamemustbeuniquewithinaschema.
source_encoding
Thesourceencodingname.
dest_encoding
Thedestinationencodingname.
function_name
Thefunctionusedtoperformtheconversion.Thefunctionnamecanbeschema-qualified.Ifit
isnot,thefunctionwillbelookedupinthepath.
Thefunctionmusthavethefollowingsignature:
conv_proc(
integer,
-- source encoding ID
integer,
-- destination encoding ID
cstring,
-- source string (null terminated C string)
internal, -- destination (fill with a null terminated C string)
integer
-- source string length
) RETURNS void;
1335
CREATECONVERSION
Notes
Use
DROP CONVERSION
toremoveuser-definedconversions.
Theprivilegesrequiredtocreateaconversionmightbechangedinafuturerelease.
Examples
Tocreateaconversionfromencoding
UTF8
to
LATIN1
using
myfunc
:
CREATE CONVERSION myconv FOR ’UTF8’ TO ’LATIN1’ FROM myfunc;
Compatibility
CREATE CONVERSION
is aPostgreSQL extension.Thereis no
CREATE CONVERSION
statementin
theSQLstandard,buta
CREATE TRANSLATION
statementthatisverysimilarinpurposeandsyntax.
See Also
ALTERCONVERSION,CREATEFUNCTION,DROPCONVERSION
1336
CREATE DATABASE
Name
CREATE DATABASE—createanewdatabase
Synopsis
CREATE DATABASE
name
[ [ WITH ] [ OWNER [=]
user_name
]
[ TEMPLATE [=]
template
]
[ ENCODING [=]
encoding
]
[ LC_COLLATE [=]
lc_collate
]
[ LC_CTYPE [=]
lc_ctype
]
[ TABLESPACE [=]
tablespace_name
]
[ CONNECTION LIMIT [=]
connlimit
] ]
Description
CREATE DATABASE
createsanewPostgreSQLdatabase.
Tocreateadatabase,youmustbeasuperuserorhavethespecial
CREATEDB
privilege.SeeCREATE
USER.
Bydefault,thenewdatabasewillbecreatedbycloningthestandardsystemdatabase
template1
.A
differenttemplatecanbespecifiedbywriting
TEMPLATE
name
.Inparticular,bywriting
TEMPLATE
template0
,youcancreateavirgindatabasecontainingonlythestandardobjectspredefinedbyyour
versionofPostgreSQL.Thisisusefulifyouwishtoavoidcopyinganyinstallation-localobjectsthat
mighthavebeenaddedto
template1
.
Parameters
name
Thenameofadatabasetocreate.
user_name
Therolenameoftheuserwhowillownthenewdatabase,or
DEFAULT
tousethedefault(namely,
the userexecutingthecommand).Tocreateadatabaseownedbyanotherrole,youmustbea
directorindirectmemberofthatrole,orbeasuperuser.
template
Thenameofthetemplatefromwhichtocreatethenewdatabase,or
DEFAULT
tousethedefault
template(
template1
).
encoding
Character set encoding to use in the new database. Specify a string constant (e.g.,
’SQL_ASCII’
), or an integer encoding number, or
DEFAULT
to use the default encoding
(namely, the encoding of the template database). The character sets supported by the
PostgreSQLserveraredescribedinSection22.3.1.Seebelowforadditionalrestrictions.
1337
Documents you may be interested
Documents you may be interested