Evet çok saçma CREATE TEMP TABLE zamazingo (ID INT); INSERT INTO mytable (ciger,adana,lahmacun,pide,doner) VALUES ('miger','madana','mahmacun','mide','moner'); INSERT INTO zamazingo (ID) VALUES (dbinfo('sqlca.sqlerrd1')); select id from zamazingo
Devamını Oku »postgresql find dependent object
https://stackoverflow.com/questions/4462908/find-dependent-objects-for-a-table-or-view SELECT dependent_ns.nspname as dependent_schema , dependent_view.relname as dependent_view , source_ns.nspname as source_schema , source_table.relname as source_table , pg_attribute.attname as column_name FROM pg_depend JOIN pg_rewrite ON pg_depend.objid = pg_rewrite.oid JOIN pg_class as dependent_view ON pg_rewrite.ev_class = dependent_view.oid JOIN pg_class as source_table ON pg_depend.refobjid = source_table.oid JOIN pg_attribute ON pg_depend.refobjid …
Devamını Oku »Postgresql Truncate restart identity
truncate table tbl_a,tabl_b restart identity;
Devamını Oku »Windows python “Asyncio Event Loop is Closed” when getting loop
import time start = time.time() asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) asyncio.run(pg_to_zamazingo(2)) end = time.time() print(end - start)
Devamını Oku »←[32mINFO←[0m: python uvicorn ENABLE_VIRTUAL_TERMINAL_INPUT
import ctypes kernel32 = ctypes.windll.kernel32 kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7)
Devamını Oku »postgresql mail domain citext
CREATE EXTENSION citext; CREATE domain dmn_email AS citext check( VALUE ~'^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+[.][A-Za-z]+$'); SELECT 'zamazingo@zamazingo.com'::dmn_email;
Devamını Oku »python pydantic strip all whitespace
pydantic strip all str attribute class Zamazingo(BaseModel): class Config: anystr_strip_whitespace = True
Devamını Oku »postgresql smallint default year field
year SMALLINT NOT NULL DEFAULT EXTRACT (YEAR FROM CURRENT_DATE)
Devamını Oku »python xls to xlsx converter windows
def get_list_files_in_folders(path: str, file_ext: str = ''): """ directory deki ve sub directory deki dosyalarin listesini doner """ tmp_list = [] for root, dirs, files in os.walk(path): for file in files: if file.endswith(file_ext): tmp_list.append(os.path.join(root, file)) # print(os.path.join(root, file)) return tmp_list def get_file_name_from_path(path: str): return os.path.basename(path) import os import win32com.client as …
Devamını Oku »python base dir
BASEDIR = os.path.abspath(os.path.dirname(__file__))
Devamını Oku »